Return JSON Objects instead of JSON arrays with JSON-SERVER
<p>I am using <a href="https://github.com/typicode/json-server" rel="nofollow"><code>json-server</code></a> to push json data as REST api.</p>

<p>Server returns (above) for get request like this:</p>

<pre><code>http://localhost:3000/items?itemid=534
</code></pre>

<p>return:</p>

<pre><code>[
  {
    "itemid": 534,
    "type": "textcontent",
    "icon": "http://exampple.com/1png",
    "title": "John",
    "description": "Description",
    "url": "http://example.net/project/doSomething"
  }
]
</code></pre>

<p>return is <code>JSON array</code>, but not <code>JSON object</code>. </p>

<p>What should i do, to return json object</p>

<p>Data file is: data.json</p>

<pre><code>{
  "items": [
    {
      "itemid": 534,
    "type": "textcontent",
    "icon": "http://exampple.com/1png",
    "title": "John",
    "description": "Description",
    "url": "http://example.net/project/doSomething"
    },
    {
      "itemid": 234,
    "type": "textcontent",
    "icon": "http://exampple.com/2png",
    "title": "Smith",
    "description": "Description2",
    "url": "http://example.net/project/doSomething2"
    }
    ]
}
</code></pre>