How to pick and match data from 2 different json arrays
Hi all!
I have prepared a page where I have a list with all my users.
http://pitto.homeip.net/mobile
On the right side of the page (in the span where now you found the nick written in a small baloon) I'd like to put a counter where I have all the months' the user has paid the rent.
I use two different php files to get the data I need and format it to JSON.
The problem is that, being a beginner, I can't think of how "mix" the two data.
I'd need to have in the same row data about the user (name, nick etc) and the total amount of months he paid.
I've read about the extend function (var obj = $.extend({},json1,json2);) but is this what I need?
I really can't imagine in my mind how it would be better to proceed.
Another idea would be to do the total paid month calculation when a new month of payment is inserted and save it in a separated column but it would be, again, in the payment table and not in the customer table.
Thanks to everybody who'll help.
Also a kind suggestion about what to study would be pure gold :)