How to use Expressions when json are in unamed object


How to select last node return json:

[{ "metrics": { "annualRevenue": "XXX" } }]

How to write this expression in n8n? Cause the first object nothing is working well for me.


Hey @MatheusRV!

Looking at the output you shared, your field is named annualRevenue while you’re trying to get the value for estimatedAnnualRevenue. Can you please make sure that the field names are same?

Also, can you share the workflow? A dummy workflow with the similar result might also work. :slightly_smiling_face:


I write name wrong, both vars exist

I can just repeat that what @harshil1712 wrote sounds to 100% correct to me. The following ones should work perfectly looking at the screenshot you did post:


Anyway both of them are null so the output will be empty.

To check if it outputs data correctly you can test with another property which has actually a displayable value set like “employeesRange”: