如何解析HomeAdvisor的JSON有效负载的未格式化文本字符串字段,并通过Zapier代码将其插入到crm中的自定义字段中

问题描述

the image shows my current zapier connection that pushes the unformatted data in the "interview" field into the crm multi-line text. But as you can see,the "answer" data needs to be parsed and go directly into the corresponding fields that match the "question" data

我在JSON中获得一个“采访”字段,其中有4个集总字段,我需要将其提取并插入到crm的字段中……这就是它的样子……

采访字段:

answer:单身家庭 问题:建筑类型

answer:添加坡道和扶手 问题:重塑需求

answer:无 问题:设计准备

answer:规划和预算编制 问题:请求阶段

answer:两个月以上 问题:所需的完成日期

answer:否 问题:保险承保

answer:是 问题:业主

一个问题是问题和答案都颠倒了,第二个问题是我不知道如何将每个答案推入自定义字段

我已经看到堆栈溢出,人们使用它来解析数据: 输出= {};

var obj = JSON.parse(input.data);

for (var i = 0; i < obj.length; i++) {
   output["myObject"+i] = JSON.stringify(obj[i]);
}

我不知道从哪里开始

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)