alonrbar/easy-template-x

Data Structure - Printing properties of an object.

Closed this issue · 2 comments

Hi there,

I have just a quite simple question. Having the following data structure:

{ "User": { "Name" : "Peter Smith", "Age": 26 } }
How can I print both fields in a document? I have the following placeholder on my template:

Title: User Details {User.Name} has {User.Age}

Nothing is being printed.
Does anyone have suggestions to get this working?

Thanks.

Rui R.

Either use the above suggestion or change your input to:

{ "User.Name": "Peter Smith", "User.Age": 26 }