Simple Array Handling

0
Hello,  im currently trying to set up an Application, which shows Data in a Table (later in a Graph), that i receive from an API.  The API gives back a JSON structure and is built like shown below:   [ { "Sensor": "S1", "Value": 6, "timestamp": "Sat, 20 Jun 2020 09:57:09 GMT"}, { "Sensor": "S2", "Value": 3, "timestamp": "Sat, 20 Jun 2020 09:57:09 GMT"}, { "Sensor": "S3", "Value": 13, "timestamp": "Sat, 20 Jun 2020 09:57:09 GMT"} ]   The import Mapping creates two Entities → 1st : SensorData (Attributes: Sensor (String), Value (Integer), Timestamp (String)) → 2nd : Sensor List (Attributes: *Empty*) Question: How do i make it possible to receive just the Value of “S1” and show it in a List / Widget?  As i am quite new to Mendix im struggling a little bit here to get this working…even if i think its probably quite simple. I hope anyone can help me!   Thank you very much in Advance!
asked
1 answers
0

Looks like you have done most of the work already. To select the element that you want to cherrypick from the message op the importmapping and click at the top-left on the button ‘Select elements’. You can deselect the two attributes ‘value’ and ‘timestamp’ and you are done.

One optional improvement: You can also deselect the “(Object)”. As a result, you will no longer will need the Sensorlist as a separate entity.

answered