I only want to place the data if the there is a value in the string like person location does not have a value so I dont want that in http request. so how can I make it work
Do I have to write if node for every single value or there is some other way to do this
@Arsh_Tyagi , depending on what you do with this data later on in the workflow, you can use either IF node or Filter node. The condition would be to check if person location “is empty”.
@Arsh_Tyagi , I think I misunderstood your requirement. So, you want to remove those properties from an object that have no value (that is have null as a value)? If that is so, here’s your code assuming there is only one item (hence, I used $input.first().json),
const output = {};
for (i of Object.entries($input.first().json)) i[1] ? output[i[0]] = i[1] : null;
return output;
I have 2 problems in this one the data is coming in this format [{“organization_ids”:null},{“organization_num_employees_ranges”:“["21,50","51,100"]”},{“organization_industry_tag_ids”:“["5567ce1f7369643b78570000"]”},{“contact_email_status_v2”:“["likely_to_engage","verified"]”},{“person_titles”:null},{“q_organization_keyword_tags”:null},{“included_anded_organization_keyword_fields”:null},{“q_not_organization_keyword_tags”:null}
but I want it to look like , “organization_industry_tag_ids”:[“5567ce1f7369643b78570000”],“contact_email_status_v2”:[“likely_to_engage”,“verified”] without any {{ // or extra “”
also there is one more problem if I am using call for another workflow node in the end the workflow runs incomepletely . If i remove the execute another workflow node then the workflow runs all the nodes
Here is the workflow I want to place this all information in http request for making API request and if I place object with no value then http gives an error so this is important for that
@Arsh_Tyagi , you are not using my code in the right place. The single node I provided replaces all of your IF nodes. It becomes just this up to Spreadsheet node.
Mind you the Set3 node had no data pined to test (at least it is empty for me) but I’m confident that it should work (unless I still do not follow your initial requirement). All your set nodes should be in a single Set (“Flatten data”) combining all the properties (I left that part for you to complete).
We can come to the reset of your questions later as those seem to be a different topic from your original question.