โ06-09-2021 08:15 AM
Question: I have input JSON array
[
{โnameโ:โAUโ, โvalueโ: 3},
{โnameโ:โUSโ, โvalueโ: 1},
]
I want to have 2nd object i.e. {โnameโ:โUSโ, โvalueโ: 1}
please advise how to get it?
Thanks,
DK
โ06-09-2021 08:52 AM
Hi @deepak.shaw,
If they are documents then you can use Gate snap and after gate you just select $input0[1]
, and it will return you always the second document. But if you want last document than use Tail snap.
Note: Gate snap will wait all documents to come on input and after will return you the data.
โ06-10-2021 07:44 PM
Thanks for the reply.
Actually, Iโm receiving the message from Kafka Consumer like: