Accepted answer

You can do a["Grant Organization"] instead, it should work

See for more information


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