skip to Main Content

Javascript – Move elements to first position in nested array

I want to move an element to first position from an inner array like below { "activeContainerId": "955bd18f-6561-44b4-ba8f-7094e4e183b8", "amendCartContainers": [], "data": [ { "id": "955bd18f-6561-44b4-ba8f-7094e4e183b8", "categoryName": "My_Category_Name", "categoryId": "cat_spc_my_category", "sections": [ { "id": "cat_spc_my_id", "title": "APPLE", "items": [ { "id":…

VIEW QUESTION

Transform a series of JavaScript object keys into array(s) when they contain numbers

I have this object: { name: "Gold's Gym Venice", "categories[0].alias": "gyms", "categories[0].title": "Gyms", "categories[1].alias": "healthtrainers", "categories[1].title": "Trainers", "location.state": "CA", "location.city": "Venice", "location.zip_code": "90291", "location.display_address[0]": "360 Hampton Dr", "location.display_address[1]": "Venice, CA 90291" } ... and am trying to transform it into…

VIEW QUESTION
Back To Top
Search