title: How To concatenate Two Json object in Asp.Net
body: <p><a href="https://i.stack.imgur.com/LgEne.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LgEne.png" alt="This one is of other"></a><a href="https://i.stack.imgur.com/TdVKn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TdVKn.png" alt="This one is the output"></a><a href="https://i.stack.imgur.com/QAnEk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QAnEk.png" alt="This is what i am getting in lstrng"></a><a href="https://i.stack.imgur.com/74ZT0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/74ZT0.png" alt="This is what i am getting in a"></a>How to concatenate the result <code>Json(new{lstrng,a}, JsonRequestBehavior.AllowGet);</code>. I want to see result of lstrng and a collectively. My code is </p>
  
  <pre><code>var a = this.abc();  
  JsonResult json =Json(new{lstrng,a}, JsonRequestBehavior.AllowGet);  
  json.MaxJsonLength = int.MaxValue;  
  return json;
  </code></pre>
  
  <p>here abc is an other method and lstrng is the result of current method</p>
  
  <pre><code>public JsonResult gFbrRecord()
      {
          DataSet ds = dblayer.gfbrdata();
          //this is for getordert tart
          List&lt;fbrData&gt; lstrng = new List&lt;fbrData&gt;(10000);
          foreach (DataRow dr in ds.Tables[0].Rows)
          {
              lstrng.Add(new fbrData
              {  
                 FBRInvoiceNumber = dr["FBR_NUM"] != DBNull.Value ? Convert.ToString(dr["FBR_NUM"]) : Convert.ToString(""),
                  POSID = dr["REG_NUM"] != DBNull.Value ? Convert.ToInt32(dr["REG_NUM"]) : Convert.ToInt32(0),
                 });               
  
          }
  
          var a = this.abc();                 
          JsonResult json =Json(new{lstrng,a}, JsonRequestBehavior.AllowGet);
          json.MaxJsonLength = int.MaxValue;
          return json;
      }
       public JsonResult abc() {
          DataSet ds = dblayer.gfbrdata();
          List&lt;fbr1&gt; lstrng = new List&lt;fbr1&gt;(10000);
          foreach (DataRow dr in ds.Tables[0].Rows)
          {
              lstrng.Add(new fbr1
              {  
                  DetailSerialNo = dr["SRL_NUM"] != DBNull.Value ? Convert.ToInt32(dr["SRL_NUM"]) : Convert.ToInt32(0),                   
                  ItemCode = dr["ITM_COD"] != DBNull.Value ? Convert.ToString(dr["ITM_COD"]) : Convert.ToString(""),
                });
  
          }
  
          JsonResult json = Json(lstrng, JsonRequestBehavior.AllowGet);
          json.MaxJsonLength = int.MaxValue;
          return json;
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/KXTNH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KXTNH.png" alt="This one is the output i am getting not"></a></p>