Hello,
I am trying to get my store data trough node.js
This is the part from my program that returns the data from the node.js
Code:
  collection.find().toArray(function(err, items) {
    
            var leaders = 
               {
                       leader: items,
               };
 
            res.send(leaders);
And it’s return the data like this:
Code:
{
  "leader": [
    {
      "name": "name 1",
      "points": "210",
      "_id": "51069337e3120bcc29000001"
    },
    {
      "name": "name 2",
      "points": "156",
      "_id": "51069337e3120bcc29000002"
    }
  ]
}
My model is:
Code:
Ext.define('FB.model.leaderboardModel', { 
        extend: 'Ext.data.Model',
        fields: ['name', 'points', '_id'],
});
My store is:

Code:
Ext.define('FB.store.leaderboardStore', { 
        extend:'Ext.data.Store',
        model:'FB.model.leaderboardModel',
        autoLoad: true,
        sorters: {
               property:'ID',
               direction:'ASC'
        },
        proxy:{ 
               type: 'jsonp',
               url: 'http://localhost:3000/InnoUsers',
               reader: {
                       type: 'json',
                       root: 'leader'
        }
 
              
        },
       
});
I get the error:
“Uncaught SyntaxError: Unexpected token :”

Moreover when I debug I can see that the data come perfectly like this:
Code:
{
  "leader": [
    {
      "name": "name 1",
      "points": "210",
      "_id": "51069337e3120bcc29000001"
    },
    {
      "name": "name 2",
      "points": "156",
      "_id": "51069337e3120bcc29000002"
    }
  ]
}
And the error is on "leader":

I can’t understand why I get this error
any ideas?
Help please