Loop through Js Array of objects


Im using a reason component inside my react component and I want to pass an array of objects as props like so

              label: "First",
              content: "Hey",
              id: 0
              label: "Second",
              content: "Maybe",
              id: 1

The steps props in particular.
Im not sure how to loop over them in the corresponding reason file

Can anyone just create a gist of a file which can loop over the items even if its in li tags. Thanks


How’s this snippet?

The key bit is

            step => <div>
              (str(step.label ++ ": "))
          ) |> Array.of_list


This is awesome. It works… Thanks