title: User selected values from JSON
body: <p>When a user fills out a form in a mobile application a json is created. I load this json into a postgres database and wanting to pull is apart and select the inputs that the user has selected.</p>
  
  <p>I find this hard to explain you really need to see the json and the expected results. The json looks like this...</p>
  
  <pre><code>{
     "iso_created_at":"2019-06-25T14:50:59+10:00",
     "form_fields":[
        {
           "field_type":"DateAndTime",
           "mandatory":false,
           "form_order":0,
           "editable":true,
           "visibility":"public",
           "label":"Time &amp; Date Select",
           "value":"2019-06-25T14:50:00+10:00",
           "key":"f_10139_64_14",
           "field_visibility":"public",
           "data":{
              "default_to_current":true
           },
           "id":89066
        },
        {
           "field_type":"Image",
           "mandatory":false,
           "form_order":6,
           "editable":true,
           "visibility":"public",
           "label":"Photos",
           "value":[
  
           ],
           "key":"f_10139_1_8",
           "field_visibility":"public",
           "data":{
  
           },
           "id":67682
        },
        {
           "field_type":"DropDown",
           "mandatory":true,
           "form_order":2,
           "editable":true,
           "visibility":"public",
           "label":"Customer ID",
           "value":"f_10139_35_13_35_1",
           "key":"f_10139_35_13",
           "field_visibility":"public",
           "data":{
              "options":[
                 {
                    "is_default":false,
                    "display_order":0,
                    "enabled":true,
                    "value":"f_10139_35_13_35_1",
                    "label":"27"
                 }
              ],
              "multi_select":false
           },
           "id":86039
        },
        {
           "field_type":"CheckBox",
           "mandatory":true,
           "form_order":3,
           "editable":true,
           "visibility":"public",
           "label":"Measure",
           "value":[
              "f_7422_10_7_10_1",
              "f_7422_10_7_10_2"
           ],
           "key":"f_10139_1_5",
           "field_visibility":"public",
           "data":{
              "options":[
                 {
                    "is_default":true,
                    "display_order":0,
                    "enabled":true,
                    "value":"f_7422_10_7_10_1",
                    "label":"Kg"
                 },
                 {
                    "is_default":true,
                    "display_order":0,
                    "enabled":true,
                    "value":"f_7422_10_7_10_2",
                    "label":"Mm"
                 }
              ],
              "multi_select":true
           },
           "id":67679
        },
        {
           "field_type":"ShortTextBox",
           "mandatory":true,
           "form_order":4,
           "editable":true,
           "visibility":"public",
           "label":"Qty",
           "value":"1000",
           "key":"f_10139_9_9",
           "field_visibility":"public",
           "data":{
  
           },
           "id":85776
        }
     ],
     "address":"Latitude: -37.811812 Longitude: 144.971745",
     "shape_id":6456,
     "category_id":75673,
     "id":345,
     "account_id":778
  }
  </code></pre>
  
  <p>Can anyone help me?</p>
  
  <p>Expected results:</p>
  
  <pre><code>account_id | report_id | field_label        | field_value
  ------------------------------------------------------------------------
  778        | 345       | Time &amp; Date Select | 2019-06-25T14:50:00+10:00
  778        | 345       | Photos             |  []
  778        | 345       | Customer ID        | 27
  778        | 345       | Measure            | Kg 
  778        | 345       | Measure            | Mm
  778        | 345       | Qty                | 1000
  </code></pre>