title: send multidimensional array in angularjs $http POST api call
body: <p>I want to send multidimensional array in angularjs. The request is sending from angularjs UI to Laravel API side, In API side I need the input as <br> </p>
  
  <pre><code>array:3 [
        0 =&gt; array:3 [
          "title" =&gt; "name1"
          "type" =&gt; "type1"
          "rate" =&gt; 11
        ]
        1 =&gt; array:3 [
          "title" =&gt; "name2"
          "type" =&gt; "type2"
          "rate" =&gt; 31
        ]
        2 =&gt; array:3 [
          "title" =&gt; "name3"
          "type" =&gt; "type3"
          "rate" =&gt; 13.333
        ]
      ]
  </code></pre>
  
  <p><br> But I not getting so. The static data I am trying to send from angular is <br></p>
  
  <pre><code>var values = [
                {
                    "title" =&gt; "name1"
                    "type" =&gt; "type1"
                    "rate" =&gt; 11
                },
                {
                    "title": "Make an offer Rate",
                    "type": "make_offer_rate",
                    "rate": 30
                },
                {
                    "title": "Test price",
                    "type": "test_rate",
                    "rate": 100
                }
            ];
  
          $http({
                  method: 'POST',
                  url: urls.api_url_serv+'rate?token='+token,
                  transformRequest: transformRequestAsFormPost,
                  data: {
                       rates:JSON.stringify(values),
                  },
                  withCredentials: false,
                  headers: {
                       'Accept': 'application/json',
                       'Content-Type': "application/x-www-form-urlencoded"
                  };
  </code></pre>
  
  <p>Its getting as string in API side When I tried to dd() the Response was <br> <code>"[{"title":"name1","type":"type1","rate":45},{"title":"name2","type":"type2","rate":30},{"title":"name3","type":"type3","rate":100}]"</code> <br> I need to handle it from UI side since the API section is not done by me </p>