[FX.php List] JSON help
Gjermund Gusland Thorsen
ggt667 at gmail.com
Thu Jan 15 04:34:09 MST 2009
I assume what you are looking for would be something along these lines:
---
foreach( $rSlaveTable as $v ) {
$tmp[$v['type'][0]] = $v['value'][0];
}
$desiredArray[ $rParent['data'][key($rParent['data'])]['parent_date'] ] = array(
'count' => $rParent['foundCount'],
'tags' => $tmp;
);
---
ggt
2009/1/15 Gjermund Gusland Thorsen <ggt667 at gmail.com>:
> In order to make that array, I would have to know your current
> Filemaker sources for the fields involved.
>
> ggt
>
> 2009/1/15 Blair Duncan <Blair.Duncan at bbdo.ca>:
>> >From a lurker...
>>
>> Usually I would sit on my hands rather than replying with a wiseass remarks
>> such as "and this has something to do with FX/PHP in what way???" as it is
>> more of a php question.
>>
>> But then I click on the link and think, wow another cool thing that I may be
>> able to use someday. Good people on this list, thanks.
>>
>>
>> On 14/01/09 9:38 PM, "david weiner" <1265 at lucerneblvd.org> wrote:
>>
>>> Hi,
>>> If anyone on the list has any experience getting FX/PHP to output JSON
>>> encoded data (using json_encode) - I'd like to hear from about it.
>>>
>>> I'm looking to get filemaker data into JSON for a few reasons,
>>> primarily all chart related, and am struggling a little with the PHP.
>>> For one example I'm trying to achieve an array that looks like:
>>>
>>> [2006-11-01] => Array
>>> (
>>> [count] => 10
>>> [tags] => Array
>>> (
>>> [web] => 1
>>> [search] => 1
>>> [chinese] => 1
>>> [food] => 1
>>> [tomatoes] => 1
>>> [bread] => 1
>>> [restaurants] => 1
>>> [japanese] => 1
>>> [coffee] => 1
>>> )
>>>
>>> )
>>>
>>> where [2006-11-01] = [parent_date]
>>> [count] = field[number_of_children_for_parent_date] (portal rows)
>>> [tags] => Array ( ... ) is a loop grabbing all the comma separated
>>> field contents from each portal row for the parent date.
>>>
>>> The ultimate goal is produce a timecloud using jQuery
>>> (http://wiki.github.com/stef/timecloud), but I think if I can get this
>>> figured out, then extending FX to feed all kinds of JSON driven data
>>> visualizers _should_ be doable.
>>>
>>> I've got some very rough code adapted from the timecloud delicious
>>> sample data and would be happy to share it, but it's basically not
>>> working so I'm leaving it off for now.
>>>
>>> thanks,
>>> David
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>
>>
>>
>> Please consider the environment before printing this e-mail.
>>
>> This message and any attachments contain information, which may be confidential or privileged. If you are not the intended recipient, please refrain from any disclosure, copying, distribution or use of this information. Please be aware that such actions are prohibited. If you have received this transmission in error, kindly notify us by e-mail to helpdesk at bbdo.com. We appreciate your cooperation.
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>
More information about the FX.php_List
mailing list