score:0

Accepted answer

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']);
});


Related Query