Q:

Iterate through FieldArray redux-form

Could anyone point me in the right direction of iterating through the values of a FieldArray in redux-form? I'm making a form review page where I want to display all the values of the form. I currently have a FieldArray called customTrips that looks like this: 
"customTrips": [
    {
      "pick_up_date1": "2017-08-22",
      "pick_up_time1": "12:31",
      "airline1": "Delta",
      "terminal1": "12",
      "flight_Number": "213",
    },
    {
      "pick_up_time1": "12:31",
      "pick_up_date1": "2017-08-22",
      "airline1": "American Airlines",
      "terminal1": "5",
      "flight_Number": "A12",
    }
  ]

This is the selector I use to get all the form values:
const selector = getFormValues('wizard');
WizardFormEighthPage = connect(state => {
  const formValues = selector(state);
    return {
      formValues
    };

})(WizardFormEighthPage);

I'm confused on how I can iterate through the customTrips FieldArray and access the values to display on the review page. Any help would be greatly appreciated. Thanks.

A:

I figured it out finally! Hope this helps anyone who is facing a similar problem. I was able to use the getFormValues selector and access the customTrips array using a map. This allowed me to be able to iterate through the customTrips array. 
Here is a sample to get the "pick_up_date1" value from the customTrips FieldArray:
{formValues.customTrips.map((customTrips, index) => (
   <div id="trip1_itin" className="section" key={index}>
        Address: {customTrips.pick_up_date1}
   </div>
))}

