查询JSON输出。 (来自MySQL)

I'm working on a calendar roster system for work. Unfortunately most solutions/plugins aren't ideal for what I want.

Anywho, what I was wondering is if it possible to select a value from an array output in JSON format, based on multiple criteria. I am using jQuery

to put it fairly generically (haven't started coding it yet):

<for each cell>
--<find ['number_of_slots'] in JSONarray where ['AppointmentDate'] = "02/02/12" && ['salespoint'] = 1 && ['AppointmentTime] = '10AM'>
--<if no results>
-----<fill cell with 'x'>
--<else>
-----<fill cell with ['number_of_slots']
--<end if>

Or am I better off making an MySQL query for each cell? Just seems to be quite a number of transactions, that's all.

As always, any help and advice is greatly appreciated!

Cheers!

If manipulating the data as javascript object than parsing it back to jSon is acceptable:

Parse it to js object: http://api.jquery.com/jQuery.parseJSON/

Parse it back to jSon to String: http://api.jquery.com/jQuery.param/

Parse to jSon issue discussed Convert Object to JSON string

Not the answer to your question but a solution with jQuery, though