Javascript Getting Dynamic Output Using Jsonata While

Javascript Getting Dynamic Output Using Jsonata While