for(var i in objIn){
trace(i+" = "+objIn[i]);
}
And if you needed to go even deeper in it:
for(var i in objIn){
trace(i+" = "+objIn[i]);
for(var n in objIn[i]){
trace(n+" = "+objIn[i][n]);
}
}
Best of luck!
Jake
On 6/8/06, Leif Wells <[EMAIL PROTECTED]> wrote:
All,
Using the oflaDemo application's Application.java file as an example, I was trying to create a method that returns some data from Reb5 to the Flash client.
In my code:
public List getTeachers(String sessionid, String classroomid)
{
List<Map> teachers = new ArrayList<Map>();
//
Map<String, String> teacher1 = new HashMap<String, String>();
String teacher1_key = "123456789";
String teacher1_value = "Justin Beals";
teacher1.put(teacher1_key, teacher1_value);
teachers.add(teacher1);
//
Map<String, String> teacher2 = new HashMap();
String teacher2_key = "987654321";
String teacher2_value = "Leif Wells";
teacher2.put(teacher2_key, teacher2_value);
teachers.add(teacher2);
//
return teachers;
}
Now, on the client side, it returns something and that something is a typeof "object" and has a length of 2.
But if I try to access it like obj[0] or obj[0].key the client (and the Flash IDE) crashes. Boom!
What am I doing wrong?
Leif
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org
_______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
