Need only names from array of object.http://forums.asp.net/t/1768009.aspx/1?Need+only+names+from+array+of+object+Fri, 10 Feb 2012 08:58:02 -050017680094825644http://forums.asp.net/p/1768009/4825644.aspx/1?Need+only+names+from+array+of+object+Need only names from array of object. <p>Hi,</p> <p>I have Array of Object like below in Jquery, i want to get name of the column. Value is not important here.</p> <p><strong>var obj= data.Shape</strong> gives me below line but out of this i need name of the Shape like Round, Princess etc....</p> <p></p> <p><strong><span class=" ">Shape:&nbsp;</span><a class="objectLink objectLink-object a11yFocus "><span class="objectTitle "> Object </span><span class="objectLeftBrace ">{</span> Round<span class="objectEqual ">=</span><span class="objectBox objectBox-number ">156057</span><span class="objectComma ">, </span>Princess<span class="objectEqual ">=</span><span class="objectBox objectBox-number ">54292</span><span class="objectComma ">, </span>Marquise<span class="objectEqual ">=</span><span class="objectBox objectBox-number ">12941</span><span class="objectComma ">, </span><span class="objectEqual "></span><span class="caption ">more...</span><span class="objectComma "></span><span class="objectRightBrace ">}</span></a></strong></p> <p>Please suggest me...</p> <p>Thanks</p> 2012-02-10T05:59:28-05:004825712http://forums.asp.net/p/1768009/4825712.aspx/1?Re+Need+only+names+from+array+of+object+Re: Need only names from array of object. <p>if it is javascript object then property name and value should be delimitted by colon - :</p> <p>then this works</p> <p>&nbsp;&nbsp;&nbsp; var shapeObject = { Round:156057, Princess:54292, Marquise:12941};<br> <br> &nbsp;&nbsp;&nbsp; for (var name in shapeObject) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert(name);<br> &nbsp;&nbsp;&nbsp; }</p> <p>else u will have to use a string split logic</p> <p>hope this helps...</p> 2012-02-10T06:40:41-05:004825911http://forums.asp.net/p/1768009/4825911.aspx/1?Re+Need+only+names+from+array+of+object+Re: Need only names from array of object. <p>Hi,</p> <p>Are you trying to create JSON data to HTML table. If so, check this post-</p> <p><a href="http://growingtech.blogspot.in/2010/12/json-to-html-table.html">http://growingtech.blogspot.in/2010/12/json-to-html-table.html</a></p> 2012-02-10T08:49:09-05:004825932http://forums.asp.net/p/1768009/4825932.aspx/1?Re+Need+only+names+from+array+of+object+Re: Need only names from array of object. <p>Hi,</p> <p>Please check the links</p> <p><a href="http://msdn.microsoft.com/en-us/library/bb299886.aspx">http://msdn.microsoft.com/en-us/library/bb299886.aspx</a></p> <p><a href="http://en.wikipedia.org/wiki/JSON">http://en.wikipedia.org/wiki/JSON</a></p> <p><a href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.jsonreaderwriterfactory.aspx">http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.jsonreaderwriterfactory.aspx</a></p> <p></p> 2012-02-10T08:58:02-05:00