How do you access the attributes on the Opengts integration sql

elvin7 years ago

I tried doing this JSON_EXTRACT(:attributes, 'status') no luck! I even thre ExtractData still no luck. Any advice.

Anton Tananaev7 years ago

You should probably read JSON_EXTRACT function documentation first. It seems like you should use it like this:

JSON_EXTRACT(:attributes, "$.status")

You might also need to convert attributes from string into JSON data type.

elvin7 years ago

i'm using a meiligao protocol, not sure how is the attributes stored on the position object? right now it's a map, so i'm confused on how to access it on the sql like the other fields of the position object ex: :altitude

Anton Tananaev7 years ago

Attributes is a JSON object.

elvin7 years ago

Thanks a lot! it works appreciate it! keep up the good work