Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8905079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:18:05+00:00 2026-06-15T02:18:05+00:00

I got a JSON file with value’s that got a whitespace in them. like

  • 0

I got a JSON file with value’s that got a whitespace in them. like so:

"Project 3":6

I If try to do something in D3.js with the data like so

var meanProject3 = d3.mean(data, function(d) {return d.project 3 });
console.log(meanProject3);

i got the following error:

Uncaught SyntaxError: Unexpected token } 

If i try it with nodes that don’t have whitespace it works fine.
I can’t edit the json file. Is there any other way to make this work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:18:06+00:00Added an answer on June 15, 2026 at 2:18 am

    You can’t use dot notation when the property name has special characters such as white space. Try:

    return d['Project 3']
    

    Note that property names are case-sensitive.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well ive got this code that creates a table from JSON data. If a
I've got a JSON value that has been converted from a JavaScript object using
I've got a json file included in my javascript that defines a variable that
At the moment, I've got a JSON file with content looking like this: {
I have queried yahoo finance for historic data and have got JSon output. What
I got the JSON from apple like this { original-purchase-date-pst = 2012-06-28 02:46:02 America/Los_Angeles;
i've got an integration test that grabs some json result from a 3rd party
I want to append data to selectbox. But, I got this error... Error: $().attr(value,
I have this simple json file in my iphone/ipad project. {initial_page : Page_Selected} Page_Selected
I am parsing a JSON file using C#. Here is what I got from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.