Read a value from a 2D array of structs

I need to read “nat_ip” from the below array:
[
[
{
“assigned_nat_ip” = “”
“nat_ip” = “35.246.120.159”
“network_tier” = “PREMIUM”
“public_ptr_domain_name” = “”
},
],
]

How can I read the value from the above?

1 Like

Assuming the array is in the variable foo, foo[0][0]["nat_ip"].

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.