Solved

loop jSON value in jquery

Posted on 2012-03-26
3
355 Views
Last Modified: 2012-03-26
Hey all how can i set this up for a loop?
data.row9_1 

Open in new window


I cant seem to do it this way:
 var $theRowCount; 
 
 $theRowCount = 9; 
 
 while($theRowCount < 30){ 
    $('#row' + $theRowCount + '_1').html(data.row + $theRowCount + '_1'); 
    $theRowCount ++; 
 } 

Open in new window

Any ideas would be great!

David
0
Comment
Question by:Stealthrt
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 200 total points
ID: 37769238
 var $theRowCount; 
 
 $theRowCount = 9; 
 
 while($theRowCount < 30){ 
    $('#row' + $theRowCount + '_1').html(data[ 'row' + $theRowCount + '_1' ]); 
    $theRowCount ++; 
 } 

Open in new window

0
 

Author Closing Comment

by:Stealthrt
ID: 37769265
Awesome! Thanks :o)
0
 
LVL 82

Expert Comment

by:leakim971
ID: 37769293
you're welcome!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question