score:0
You can do a["Grant Organization"]
instead, it should work
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors for more information
score:0
Use Bracket-notation
An object property name can be any
valid JavaScript string
, or anything that can be converted to a string, including the empty string. However, any property name that is not a valid JavaScript identifier (for example, a property name that has a space or a hyphen, or that starts with a number) can only be accessed using the square bracket notation.
data = data.sort(function(a, b) {
return d3.descending(a['Grant Organization'], b['Grant Organization']);
});
Source: stackoverflow.com
Related Query
- How to select value in object with key in d3
- How to select DOM elements with number value id using D3
- D3 how to properly get the key value INSIDE of a json object
- How do I assign ticks to be equal to a different key value from the same object from the one on which the axis is based on in D3.js?
- How to use select option value (string) inside a d3.Threshold.range() that needs an object in D3.js?
- D3je: how to select all data points with specific value of particular data field
- How to get a value of select with d3?
- How to set multiple attributes with one value function?
- How to select multiple selectors with selectAll?
- How to select a d3 svg path with a particular ID
- how to get dynamic value of input element with d3?
- How to make data() key function to work with TypeScript?
- How to show a tooltip with value when mouseover a svg line graph using d3.js?
- How can D3 select multiple shapes with shared attributes from a group?
- How to pick elements in d3 with a specific property value
- Javascript: Array of dictionaries, get all key value pairs from one dictionairy with condition
- How to check the type of value in a CSV with d3.csv()?
- d3 Pie chart with one object key /value
- D3 - How to loop through an object with keys for a bar chart
- Dropdown select with default value
- d3.selectAll enter exit of nested key value pairs -- aka: how do array selections work?
- How to load a local JSON object to D3.js frontend with Django?
- How to use a value in d3 data key function?
- D3.js-How can I get the maximum value of a specified key in an object
- How to select elements according to an attribute(fill color) in D3.js with SelectAll
- How to create a % difference arrow line with value in a bar chart using D3.js
- How to create left axis with variable tick interval in tick values and has same distance between tick value
- How to sort object by key through JSON file parsing in D3.js
- D3 Object Constancy not working with key function. Enter and Update contain all elements every time
- How can i bind an json data with a key and Name for display
More Query from same tag
- x axis rescale using dropdown in line chart d3
- d3 v4 Stacked to Grouped Bar Chart from CSV
- Show d3.layout.force link tooltip on mouse over
- Adding a tooltip over different axis where the line goes through in d3
- nvd3 - how to set y axis to default values
- How to disable double click zoom for d3.behavior.zoom?
- Specifying Values in D3 Graph from JSON
- Why can't I splice an array in d3.js?
- Is there a mercurial plugin to provide github style calendar contributions?
- react-d3-component implement in create-react-app
- D3 multi-line chart with same color dots
- D3 Selection Highlight (efficiency?)
- X axis values for histogram
- Using D3 to fill an svg with a background image
- d3 v4 error this.setAttribute is not a function
- Links not showing up in D3 v4 Force layout
- how to use .scale and .translate with d3.js?
- D3.js style management robust to changes
- Javascript - Restructure array of objects
- Drawing D3 Rectangles
- Confusion about d3.interpolateObject
- C3 Graphs On Load Callback
- How to draw growth rate line in dc.js barChart?
- Bisecting an array of objects: are not all of them enumerated?
- D3.js- Dynamically updating the axis in a line graph
- JavaScript d3 passing arguments into a function that references d3.event.y
- nesting JSON with d3v4 .stratify()
- How to use custom Angular filter inside directive with D3
- D3: Referencing Drop Down Menu Selection
- D3 selections based on json data