Skip to main content

Posts

Showing posts with the label JSON

Convert Dataset Datatable To Json Data Array in Asp.Net C#.Net & VB.Net or How To Use JavaScriptSerializer to Convert Datatable to Json Data Array

In this tutorial i am going to explain about how to convert dataset datatable to json data array in asp.net c#.net & vb.net or how to use JavaScriptSerializer to convert datatable to json data array

How To Convert JSON Data Into Html Table Using Javascript jQuery

In this tutorial i am going to explain about how to display the json data into html table using javascript & jquery. For explaining how we convert the json data into html table using javascript & jquery we have created a json file that contains the below json data. data.json: [ {"Model" : "Iphone 18", "Name" : "iOS", "Share" : 57.56,"Price Range":"$800 - $1000","Brand":"Apple"},  {"Model" : "Nexus 23", "Name" : "Android", "Share" : 24.66,"Price Range":"$600 - $800","Brand":"Samsung"},  {"Model" : "Tom-tom", "Name" : "Java ME", "Share" : 10.72,"Price Range":"$200 - $900","Brand":"X Brand"}, {"Model" : "Nokia 66610", "Name" : "Symbian", "Share" : 2.49,...

Iterate through nested JSON Data using javascript

Below is the code used: <! DOCTYPE html > < html > < head >     < script src ="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></ script >     < meta charset ="utf-8" />     < title > JS Bin </ title > </ head > < body >     < div id ="output">     </ div >     < script >         ( function () {             var myobj = {                 obj1: { key1: 'val1' , key2: 'val2' },                 obj2: { key1: '2val1' ,                     ...

Iterate through json array using javascript

Javascript Array: var myArray = { "artists" :[{             "a1" : "Adam Sandler" ,             "a2" : "Adam Lambert" ,             "a3" : "Avril Levine" ,             "a4" : "Backstreet Boys" ,             "a5" : "Blackstreet" ,             "a6" : "Black Eye Peas" ,             "a7" : "Cool and the Gang" ,              "a8" : "Chicago" ,             "a9" : "Charlie Manson"         }],         "songs" :[...

Loop through json data using javascript

Introduction: In this article I am going to explain about how to loop through the JSON. It is explained using two drop down values which means for city and std codes. Explanation: In  our code we have two drop down lists. One for selecting city and another one for loading the corresponding stdcodes. The javascript function is used to loop through this json data. In this javascript code we first removing all the items from the stdcode dropdown. After that we are getting the comma separated values of the particular selected city. Then we are splitting the comma separated stdcodes and loading it to the stdcode drop down. The source code for this is given below