Closed atusi86 closed 5 months ago
Yeah the dot syntax expects to work for both arrays and objects, so this rule should work: (Works in the JavaScript playground on jsonlogic.com for sure)
{"var":"application.customers.0.firstName"}
Thanks for your quick reply @jwadhams!
Hi all, Sorry if I'm not at the right place. I tried to find out a solution and read the whole supported operations list but I got stuck. Is there any way to get an object from an array and read a property from that object? I tried the example below on the playground but unfortunately it doesnt work.
Example data:
{ "application": { "customers": [ { "firstName": "John", "lastName": "Smith" } ] } }
Expected rule:
{"var":"application.customers[0].firstName"}
Thank you in advance!