Read date from JSON file without declare

Hi All,

How to read data from JSON file without declaring any variables in eggplant function.
As of now, we are using the data below way, is there any better way to use directly can I access the data without declaring any variables.

set dataFile to JSONValue (file ResourcePath(“filepath.JSON”))
set strDomainJson to dataFile.Domainvalue

Thanks,
Srinivas.

Well, you can combine your lines into a single expression like this:

put JSONValue (file ResourcePath(“filepath.JSON”)).DomainValue
I wouldn’t recommend doing this for several values, however, as it would read the file for every one.