title: Store value from JSON to a variable
body: <p>So I am having a small issue with my project. This is the current function I am running to get the JSON value:</p>
  <pre><code>func makeCommand_GetCS() {
          if let vehicle = vehicle {
               _ = api.gVV(vehicle).done {
                   (chargeState: ChargeState) -&gt; Void in
                          
                   self.responseView.text = &quot;Charger max current: \(String(describing: chargeState.chargerPilotCurrent))\n\(chargeState.jsonString!)&quot;
                          
                }  
          }
  }
  </code></pre>
  <p>This function gives me the following JSON string:</p>
  <pre><code>charger max current: Optional(13)
  {
    &quot;fast_charger_type&quot; : &quot;MCSingleWireCAN&quot;,
    &quot;timestamp&quot; : 1624456289921,
    &quot;est_battery_range&quot; : 205.99000000000001,
    &quot;charge_energy_added&quot; : 5.5099999999999998,
    &quot;charge_current_request_max&quot; : 13,
    &quot;fast_charger_brand&quot; : &quot;&lt;invalid&gt;&quot;,
    &quot;charger_phases&quot; : 1,
    &quot;fast_charger_present&quot; : false,
    &quot;battery_heater_on&quot; : false,
    &quot;time_to_full_charge&quot; : 0,
    &quot;charge_current_request&quot; : 7,
    &quot;battery_range&quot; : 235.06999999999999,
    &quot;managed_charging_active&quot; : false,
    &quot;charge_port_door_open&quot; : true,
    &quot;charge_limit_soc_std&quot; : 90,
    &quot;charger_actual_current&quot; : 0,
    &quot;charge_port_latch&quot; : &quot;Engaged&quot;,
    &quot;charge_enable_request&quot; : true,
    &quot;charger_voltage&quot; : 2,
    &quot;trip_charging&quot; : false,
    &quot;charger_pilot_current&quot; : 13,
    &quot;charge_rate&quot; : 0,
    &quot;conn_charge_cable&quot; : &quot;IEC&quot;,
    &quot;charge_limit_soc_max&quot; : 100,
    &quot;charge_limit_soc_min&quot; : 50,
    &quot;usable_battery_level&quot; : 89,
    &quot;ideal_battery_range&quot; : 235.06999999999999,
    &quot;max_range_charge_counter&quot; : 0,
    &quot;charger_power&quot; : 0,
    &quot;scheduled_charging_pending&quot; : false,
    &quot;charge_miles_added_rated&quot; : 27,
    &quot;battery_level&quot; : 90,
    &quot;charge_to_max_range&quot; : false,
    &quot;charge_port_cold_weather_mode&quot; : false,
    &quot;charge_miles_added_ideal&quot; : 27,
    &quot;managed_charging_user_canceled&quot; : false,
    &quot;charge_limit_soc&quot; : 77,
    &quot;charging_state&quot; : &quot;Complete&quot;
  }
  </code></pre>
  <p>How can I get only the value from <code>charge_limit_soc</code> and store it as a <code>int</code> variable?</p>
  <p>EDIT: ChargeState.swift: <a href="https://pastebin.com/Z3vJsD77" rel="nofollow noreferrer">https://pastebin.com/Z3vJsD77</a></p>