jfpelletier
2 years agoContributor
Ignoring responses when an optional field is missing from the HTTP response
Hello all,
I have a HTTP Client snap that returns an array of JSON in the response, and I need to use the data from the JSON responses in the next HTTP Client only if a certain key "file" is present in the initial response. If the key is present in the JSON, I need to use the value in the next snap, but if the key is missing, I do not need to do anything.
So from a HTTP response, how can I filter the results to ignore them when this key "file" is missing?
Thanks in advance!
JF
I think that "join" snap can be avoided here, as after the second call(to get the files) you will get the JSON with the project details under the "original" object.
You can try that.
BR,
Spiro Taleski