Hello all,
I am trying to parse the data from dynamics (XMLHttpRequest) using jQuery and this is the format it is providing me
@odata.etag: "W/"3016650""
createdon: "2019-03-19T14:10:53Z"
importsequencenumber: null
modifiedon: "2019-03-19T14:10:53Z"
msdyn_customerassetid: "82cdb8cd-504a-e911-a958-000d3a124c2c"
msdyn_latitude: null
msdyn_longitude: null
msdyn_name: "Child 1"
overriddencreatedon: null
statecode: 0
I would like to parse this data with Parent/Child relation on the following format to display a Treeview control in Dynamics. Can someone please help me how to do this?
var products = [{
id: "1",
text: "Stores",
expanded: true,
items: [{
id: "1_1",
text: "Super Mart of the West",
expanded: true,
items: [{
id: "1_1_1",
text: "Video Players",
items: [{
id: "1_1_1_1",
text: "HD Video Player",
price: 220
}, {
id: "1_1_1_2",
text: "SuperHD Video Player",
price: 270
}]
}, {
id: "1_1_2",
text: "Televisions",
items: [{
id: "1_1_2_1",
text: "SuperLCD 42",
price: 1200
}, {
id: "1_1_2_2",
text: "SuperLED 42",
price: 1450
}, {
id: "1_1_2_3",
text: "SuperLED 50",
price: 1600
}, {
id: "1_1_2_4",
text: "SuperLCD 55",
price: 1350
}, {
id: "1_1_2_5",
text: "SuperLCD 70",
price: 4000
}]
}
}];
*This post is locked for comments
Any help on this would be appreciated.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156