score:0
Accepted answer
before line:
foreach ($documents as $document)
you should add:
$arraydoc = array();
and then change line:
$arraydoc= array('name' =>$document->nomdoc,'image'=>$imagedo,'group'=>3);
into:
$arraydoc[] = array('name' =>$document->nomdoc,'image'=>$imagedo,'group'=>3);
Source: stackoverflow.com
Related Query
- get all rows from mysql tables in json format
- How to get a data from an analysis in R in Json file format to get D3 visualisations?
- Get data from mysql with json and plot with D3
- D3 get JSON data from mysql always returning undefined
- Generate (multilevel) flare.json data format from flat json
- Get all dom nodes from d3 selection
- d3.js: get tick format from time scale
- d3.js get JSON from url
- Get all paths in JSON object
- Creating hierarchical JSON from MySQL results and PHP for D3.js tree?
- Javascript: Array of dictionaries, get all key value pairs from one dictionairy with condition
- How do I use d3.domain to get d3.min and d3.max from multiple columns in a JSON file?
- How to get the specific JSON array from a value in that array
- JS- how to remove duplicate JSON nodes and add one link for all nodes that get merged
- D3 map, click and get id from json
- Get max value from JSON objects D3JS
- Passing JSON from Grails Controller to d3 - how to get the .gsp side working?
- Get json data in d3 from lift snippet
- reformatted data into JSON from CSV, can't get parsing right in D3
- trying to get MySQL data into nested json file for d3?
- get data from external json with react and d3
- Get informations from JSON
- Get data from JSON to D3.js
- Get all the data from a clicked node in C3JS
- Struggling to get a chart with modified JSON format
- How to get json data from controller in jsp?
- d3.request is not a function. get JSON from API Rest
- How to get the JSON path from element
- how to make real time multi line chart using d3 where data is from api in json format
- Plotting data from json file with different date format
More Query from same tag
- Is it possible to combine data from JSON object AND from columns? [C3JS]
- Why does converting a negative string into a number ( +"-2.333" ) return NaN, only when the string came from d3.format function?
- cannot understand why function keep getting called on d3.js
- D3.js - detect intersection area
- D3js Donut chart legend
- D3 JS: Transforming the vertically grouped bar chart to horizontally grouped bar chart
- Identifying edge cases of a one-dimensional array in Javascript
- D3.js Line Graph - Adding Grid To Background and Making Line Crurve
- Update, enter and exit selections in a single chain
- Bind data to axis labels
- Clipping transformed text in an SVG
- d3 fisheye(d) returns undefined object
- How to use D3 inside a ui-view state
- Appending another element when a sibling element's transition ends
- d3 drawing arrows tips
- Javascript: Access slider value
- How to avoid the line overlapping on node and reroute the line in d3js
- d3.js Sankey using named nodes
- How to prevent d3 brush events from firing after calling brush.move
- Logarithmic range
- D3 "Sunburst" Center Path Size
- D3js graph is not showing
- Working D3 And Crossfilter for generating graph
- Call a function if not an element was clicked in svg, but other elements using d3.js v5.4.0
- Display information in line graph using d3.js with Ruby on Rails
- Elastic X axis for stacked barchart, removing the empty bins [dc.js]
- D3js/Javascript with Dart
- Overlap in d3 wordcloud
- D3 Transitions on SVG markers
- What is the logic behind d3.js nice() ticks