AWS IoT Rule SELECT does not working with a 'hex' string as JSON key?

I have an input payload like this.

{
    "state" : {
        "0x1234" : {
            "value" : 0
        }
    }
}

When I use SELECT state.0x1234.value FROM ****, it prompts error message. It seems SELECT does not work in this way. But my JSON format is totally valid. Is there a workaround?

Thanks.

1 answer

  • answered 2018-11-08 11:53 thomasmichaelwallace

    The documentation isn't very specific about this, however I think that you may need to use the AS keyword as well:

    SELECT state.0x1234.value AS theValue FROM the/topic