title: multiple select data in object format
body: <p>I have a multiple select field where I'll be selecting multiple values, but when I am sending that data to the backend it should show in the following format:</p>
  <pre><code>&quot;data&quot;: 
  [
      {
          &quot;vehicle_id&quot;: &quot;VEH1&quot;,
      },
      {
          &quot;vehicle_id&quot;: &quot;VEH2&quot;,
      },
  ]
  </code></pre>
  <p>but when I am selecting multiple values from drop down I am getting data in an array format:</p>
  <pre><code>&quot;data&quot;:[
      {
       &quot;vehicle_id&quot;:[&quot;VEH1&quot;,&quot;VEH2&quot;]
      }
  ]
  </code></pre>
  <p>How can I send data in the format which I have added in the beginning? .</p>
  <p>Code:</p>
  <pre><code>const getSelectedVehices = (selectedvehicles: any[]) =&gt; {
      const vehicles: Array&lt;string&gt; = [];
      const items = new Map&lt;string, string&gt;();
      vehicleListData.forEach((item) =&gt; {
        items.set(item.vehicleName, item.vehicleAliasId);
      });
  
      selectedvehicles.forEach((item) =&gt; {
        vehicle.push(items.get(item) || '');
      });
      return vehicles;
    };
  
    const prepareSelectedVehiclesServices = (electedvehicles: any[]) =&gt; {
      const vehicles: Array&lt;string&gt; = [];
      const items = new Map&lt;string, string&gt;();
      vehicleListData.forEach((item) =&gt; {
        items.set(item.vehicleName, item.vehicleAliasId);
      });
  
      vehicles.forEach((item) =&gt; {
        if (items.has(item)) {
          vehicles.push(items.get(item) || '');
        }
      });
      return vehicles;
    };
  
  &lt;MultiSelect
              items={pickerOptions.vehicleServices}
              onSelectedItemsChange={(Ids: any[]) =&gt; {
                const selectedVehiclesServices = getSelectedVehicles(Ids);
                formikData.setFieldValue(`vehicles`, [
                  {
                    vehicleAliasId: selectedVehiclesServices,
                  },
                ]);
              }}
              selectedItems={{
                selectedItemIdentifiers: prepareSelectedVehiclesServices(
                  formikData.values.services || initialServiceValues.services,
                ),
              }}
            &gt;&lt;/MultiSelect&gt;
  </code></pre>
  <p>the above is the code which I have added.</p>