I have a value of type dynamic
, the JSON representation of which looks like:
{ "ReportName": { "Duration": 2347, "RowCount": 1167 } }
I would like to extract the string value "ReportName" from this, as I have many rows with a similar structure, but the name of the "root" property can differ for each one.
This seems like it should be easy, but I am struggling. I have arrived at this juncture by doing an mvexpand
on a sub-property of a much larger JSON value/entity further up in my query, which has a variety of different property names inside it.
I have tried casting this to a string (using tostring()
) and using jsonextract("$", value)
, plus several similar variants, but none of them seem to work (I get NULLs back).
Thanks!