I have a json list that looks like this:
{
"callback": [{
"id": "R_puFk4fZ8m1lE4bD",
"set": "Default Response Set",
"ace": "asdf",
"date": "asdfdsa",
"1": "asdf",
"2": "s",
"3": "3",
"4": "1",
"zone": "0",
"long": "33.564498901367",
"lat": "-112.00869750977"
}
]
}
My actual data has a lot of json objects within the list and I am wondering how I would put the numbers between "date" and "zone" in a separate list within the json. The numbers vary between the json objects, but they are always in between the "date" and "zone" values.
What would I do to transform it into this:
{
"callback": [{
"id": "R_puFk4fZ8m1lE4bD",
"set": "Default Response Set",
"ace": "asdf",
"date": "asdfdsa",
"Q": [
"1": "asdf",
"2": "s",
"3": "3",
"4": "1"
],
"zone": "0",
"long": "33.564498901367",
"lat": "-112.00869750977"
}
]
}
if key not in ["id", "set", "ace", "date", ..., "lat"]: