I have a json array like this:
[
{id:1, another_id:1},
{id:2, another_id:1},
{id:3, another_id:2}
]
Is it possible to divide this into json arrays based on the key another_id. In this case two json arrays should be created like this
jsonArr1 = [
{id:1, another_id:1},
{id:2, another_id:1}
]
jsonArr2 = [
{id:3, another_id:2}
]
another_id will be varying. Please help guys