I call contents from a JSON object which contains values for different sides like side_a = 100, side_b = 200 etc.
Now I want to get the values for every selected side.. this is normally archieved like obj.side_a
var obj = $.parseJSON(data); // Inside this are values like side_a, side_b etc.
I call each value like
obj.side_a
Now I want to call this variables inside a loop (the loop returns the available sides - like a, b, c ..), because I just want to display the values of selected sides.
so the 'a' part should be added dynamically to the call..
like obj.side_+sideResultFromTheLoop to get a call like obj.side_a, obj.side_b
I tried it on different ways.. like:
obj.+'side_'+theLoopVariable
.'obj.side'+theLoopVariable
but none of it worked :(