JSON and ParseJSON now work in behavioral properties
You can use ParseJSON and JSON functions in #PowerApps behavioral properties!
You can use ParseJSON and JSON functions in **#PowerApps** behavioral properties!
A few months ago, I had an issue where I wanted to parse **#JSON** directly in the Text field (Label control) in Power Apps **#Canvas**. It was unsupported due to the usage of the behavior function in a non-behavior property - the same error that can be seen when for example trying to set a variable in the text field. A few months later... which is today when I watched April Dunnam's **#PowerAppsPulse** I noticed that this is no longer an issue. What's changed since then?
1. You can use ParseJSON and JSON wherever you want including Label.Text property - it will be evaluated on the go.
2. You can use IsEmpty on the parsed JSON and it will correctly return true if JSON contains an empty array - [].
3. IsEmpty now correctly works only with UntypedArray as a parameter - passing something else such as a record will return an error that can be handled.
4. IsBlank now correctly works when JSON contains a null value. It doesn't matter if it's the whole JSON object or one of the untyped properties.
Browse articles