QuincyAdam2
3 years agoQrew Trainee
How to access JSON object by key in Pipeline?
I have mapped an object in my pipeline that grabs 4th and 5th object value, however, the order of the objects will not always be the same based on values we're passing into the pipeline. Is there a way to grab the value of an object based on the name of the key? For example, I would rather grab the value "vid" or "sid", but I understand those are values of the object.
I can get the vid value using: {{a.body_json.meta_data.4.value}}
It's just not consistent, because it sometimes grabs the 5th or 6th object value based on what we pass. I was hoping there was a way to pull by key, but I couldn't get the syntax to work.
I've tried the following for sid, but had no luck:
{{a.body_json.sid}}
{{a.body_json.meta_data.sid}}
{{a.body_json.meta_data.0.sid}}
{{a.body_json.meta_data.5.sid}}
Help appreciated. Thanks!
------------------------------
Quincy Adam
------------------------------
I can get the vid value using: {{a.body_json.meta_data.4.value}}
It's just not consistent, because it sometimes grabs the 5th or 6th object value based on what we pass. I was hoping there was a way to pull by key, but I couldn't get the syntax to work.
I've tried the following for sid, but had no luck:
{{a.body_json.sid}}
{{a.body_json.meta_data.sid}}
{{a.body_json.meta_data.0.sid}}
{{a.body_json.meta_data.5.sid}}
Help appreciated. Thanks!
------------------------------
Quincy Adam
------------------------------