Optimized read JSON

Options
Hi,

Underneath a screenshot of a JSON message. The contactinfo may have an e-mai or telephone, but this optional.

I can loop through contactinfo and fill a variable with mailadres and telephone. After the loop I can add a record to my database and use this variable. I want to add a record with separate mail en telephone.
But this sounds like inefficient, but it works.
Can't this be done with filtering in the add record event? 
[CleanShot 2022-08-28 at 12.23.36@2x.png]

Comments

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
    Sounds like a good use case for the Array function "find first element". You just look for where $this.type is equal to the key you are looking for. (I tested and you can do this dynamically using the get filter too)

    Note this is a function but not a filter. It adds one line to your function stack.