This is my json data and I want to remove the outer array.
[
[
{
"name":"name",
"zip_code":"50700",
"state":"state",
"country":"country"
}
]
]
I want like that
[
{
"name":"name",
"zip_code":"50700",
"state":"state",
"country":"country"
}
]
2
Answers
You can simply get the first element of the array, so [0] of the array.
If you can’t change the JSON to not return a nested array, just target the 0th index of the array. Code example: