- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 10:35 AM
I have an object that looks like this:
var fieldMap = {
"form1[0].#subform[0].Pt1Line2a_FamilyName[0]": "3",
"form1[0].#subform[0].Pt1Line2b_GivenName[0]": "3",
"form1[0].#subform[0].Pt1Line2c_MiddleName[0]": "3"
};
I want to add these into the object (I have to calculate the x and the y in a function)
"form1[0].#subform[3].Pt9Line3a_PageNumber[0]": x,
"form1[0].#subform[3].Pt9Line3b_PartNumber[0]": y,
I know I can do it this way (each calculation has a function)
"form1[0].#subform[3].Pt9Line3a_PageNumber[0]": calculateX(x),
"form1[0].#subform[3].Pt9Line3b_PartNumber[0]": calcuateY(y),
Is there a way to push this into an already existing object? "form1[0].#subform[3].Pt9Line3a_PageNumber[0]": x,
Lisa
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 11:19 AM
Hi, you should be able to update the property like this
fieldMap['form1[0].#subform[0].Pt1Line2c_MiddleName[0]'] = 'z';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 11:19 AM
Hi, you should be able to update the property like this
fieldMap['form1[0].#subform[0].Pt1Line2c_MiddleName[0]'] = 'z';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 11:24 AM
Thank you. I swear I had something like that, but obviously my syntax was probably not correct. Thanks so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 11:22 AM
Yes you can. Are you working with arrays of objects? Or just one object? Can you share an example?