WebDev ReadBlocking Return All Values JSON


After reading a set of tags with system.tag.readBlocking, I would like to return their values.

I can return one tag value like this:
return {'json': {value':qualifiedValues[0].value}}

Is there a way to return all tag values? Getting errors with this:
return {'json': {values':qualifiedValues.value}

return {'json': [qv.value for qv in qualifiedValues]}

or if you’re dealing with something strict enough to not like top-level arrays,
return {'json': {"values": [qv.value for qv in qualifiedValues]}}

1 Like