Saturday, 2 February 2019

Trying to assign value by referencing external json

Im trying to separate out the functionality of my model and the data so ive created a separate json file with a basic table{"1":"apple","2":"banana","3":"orange","4":"grape"}when my model builds it creates an object and i need it to create a value in it based on a value coming in:async save (xmlOrder) {let customerOrder = {ID: xmlOrder.ID,Name: xmlOrder.Name ,ItemCode: xmlOrder.ItemCode ,Fruit: (This set by referencing the json, based on the Item code coming in above)}

Submitted February 02, 2019 at 09:37AM by dizzyack

No comments:

Post a Comment