I have a little problem with this logic. I need to create a dynamic Array of Array. But But the last object in every Array is not correct. I try some way but still not found expected result. Here
Here the snippet code :
[ [{ "article": "Burger", "order - nr": 1 }, { "article": "Soup", "order - nr": 1 }, { "article": "Noodle", "order - nr": 1 }], [{ "article": "Steak", "order - nr": 2 }, { "article": "Chicken Wings", "order - nr": 2 }], [{ "article": "Coffee", "order - nr": 3 }], [{ "article": "Rice", "order - nr": 4 }] ] ]
My expected result there is 4 Array base on order-nr key. So the total sub Array will depend on order-nr key. Any suggestion will help for me. Thanks in Advance