问题描述
我希望获取Feedbacks数组中的元素,然后更新该ids数组中的两个字段:
"Feedbacks":
[
{
"ids": "1234"
}
{
"ids": "4567"
}
]
更新此
"id":"1234"
"Features":
[
{
"id": "change this"
"status": "change this"
}
]
"id": "4567"
"Features":
[
{
"id": "change this"
"status": "change this"
}
]
我相信我可能必须这样做,请问这看起来正确吗,这是正确的方法吗?
创建两个将更新状态和ID的局部变量。
我看到我无法动态地将变量2的'FeatureID'放进去,因为它在全局上高于CDS步骤。
任何建议都值得赞赏。谢谢
JSON ORIGINAL DATA THAT HOLDS FeedBACK ARRAY IN BOLD
{
"Blocking": "test","Crmlink": null,"Contact": "test","CreatedBy": null,"DomaiNownerPriority": null,"FeatureCategory": "test","FeatureCreatedOnDate": null,"FeatureId": "test","FeaturePM": "test","FeatureTitle": "test","FeedbackDescription": "test","FeedbackName": "test","FeedbackSource": "test","FeedbackSourceLink": "test","FeedbackSubmittedBy": "test","FeedbackType": "test",*"Feedbacks": [
{
"id":"1234"
}
],*
"GPM": null,}
具有特征数组的JSON原始数据
{
"id": "123","Feedback": {
"Blocking": "","CContact": "","Competition_Details": "","Count_Of_Comments": "0","Count_Of_Votes": 0,"Domain_Area": "",**"Features": [**
{
**"id": "something","state": "something"**
}
],"Feedback_CreatedOn_Date": "test","Feedback_Description": "text","Feedback_EnteredIn_Amalgam_Date": "test","Feedback_Name": "test","Feedback_Source": "test","Feedback_Source_ID": "test","Feedback_Source_Link": "test","Feedback_Submitted_By": "test",}
您好,我正在尝试访问包含这些ID的Feedback数组。遍历每个ID(例如1234)后,我需要更改“ ID”中的Features数组并更新ID和状态。 我认为正确的方法是创建一个变量,为每个循环做一个,并进行更新。我不确定并希望得到任何建议
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)