Currently, we can only get a specific attribute in the sub_buttons. If it works in the majority of the cases, we can't get data from forecast for example, which is accessed with something like: forecast[0].templow
What did I do?
I'm making an eval in the getAttribute method to have the possibility to get a deeper value
I change some comparisons to compare an empty string so it allows 0 (it could be a valid value: eg. 0mm rain forecast)
I complement the usage of formatEntityAttributeValue: it's not powerful enough to get deep values.
Context
Currently, we can only get a specific attribute in the sub_buttons. If it works in the majority of the cases, we can't get data from forecast for example, which is accessed with something like:
forecast[0].templow
What did I do?
getAttribute
method to have the possibility to get a deeper valueformatEntityAttributeValue
: it's not powerful enough to get deep values.