I have a JSON array like this
{
"2070":{
"address_id":"2070",
"firstname":"Simon",
"lastname":"Hall",
"company":"",
"address_1":"",
"address_2":"",
"postcode":"44000",
"city":"",
"zone_id":"0",
"zone":"",
"zone_code":"",
"country_id":"223",
"country":"United States",
"iso_code_2":"US",
"iso_code_3":"USA",
"address_format":"{firstname} {lastname}
{company}
{address_1}
{address_2}
{city}, {zone} {postcode}
{country}",
"custom_field":false
},
"2071":{
"address_id":"2071",
"firstname":"Simon",
"lastname":"Hall",
"company":"",
"address_1":"TEST",
"address_2":"",
"postcode":"44000",
"city":"New York",
"zone_id":"3625",
"zone":"Colorado",
"zone_code":"CO",
"country_id":"223",
"country":"United States",
"iso_code_2":"US",
"iso_code_3":"USA",
"address_format":"{firstname} {lastname}
{company}
{address_1}
{address_2}
{city}, {zone} {postcode}
{country}",
"custom_field":false
}
}
this JSON is invalid but I am getting it in this form, I cant get it to parse as it is not a valid JSON and I cannot remove special characterd from the string. How can I extract the data of specific index from this invalid JSON? any way to loop through this JSON?