Cannot provide a number as a key in JSON - get an "Unexpected number" error.

2 posts, 0 answers
  1. AP
    AP avatar
    3 posts
    Member since:
    Jan 2013

    Posted 23 Jan 2013 Link to this post


    If I provide this simple data to a chart, the chart data shows up correctly.
    var data = [
    Please note that the above JSON has STRINGS for the keys.

    However, if I provide a number as a key, I get an "Unexpected number at line number 2156" error.

    var data = [

    Any help?
  2. Iliana Nikolova
    Iliana Nikolova avatar
    2622 posts

    Posted 24 Jan 2013 Link to this post


    In order to get the desired outcome you can pass an array to the series. I.e.:

      dataSource: {
          data: [
      series: [{
          field: "['1']"

    For a working example please check this jsBin example.

    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top