{"action":"closed","issue":{"url":"https://api.github.com/repos/vlucas/frisby/issues/306","repository_url":"https://api.github.com/repos/vlucas/frisby","labels_url":"https://api.github.com/repos/vlucas/frisby/issues/306/labels{/name}","comments_url":"https://api.github.com/repos/vlucas/frisby/issues/306/comments","events_url":"https://api.github.com/repos/vlucas/frisby/issues/306/events","html_url":"https://github.com/vlucas/frisby/issues/306","id":143787074,"number":306,"title":"Frisby.js expectJSONTypes path issues","user":{"login":"djangosdk","id":4101480,"avatar_url":"https://avatars.githubusercontent.com/u/4101480?v=3","gravatar_id":"","url":"https://api.github.com/users/djangosdk","html_url":"https://github.com/djangosdk","followers_url":"https://api.github.com/users/djangosdk/followers","following_url":"https://api.github.com/users/djangosdk/following{/other_user}","gists_url":"https://api.github.com/users/djangosdk/gists{/gist_id}","starred_url":"https://api.github.com/users/djangosdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djangosdk/subscriptions","organizations_url":"https://api.github.com/users/djangosdk/orgs","repos_url":"https://api.github.com/users/djangosdk/repos","events_url":"https://api.github.com/users/djangosdk/events{/privacy}","received_events_url":"https://api.github.com/users/djangosdk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-27T08:06:34Z","updated_at":"2016-05-17T21:08:00Z","closed_at":"2016-05-17T21:08:00Z","body":"I am trying to create API test Case using http://frisbyjs.com/docs/api/\r\nWhen i run the test I get Following error:\r\nError: Expected 'array' to be type 'object' on key 'search'\r\nCan anyone help me figure what is wrong ?\r\n\r\n**JSON RESPONSE:**\r\n```js\r\n\r\n{\r\n  \"success\": true,\r\n  \"data\": {\r\n    \"user\": [{\r\n      \"id\": 27,\r\n      \"title\": \"ABC\",\r\n      \"settings\": {\r\n        \"vOrder\": [0, 1, 2, 3, 4, 5, 6, 7],\r\n        \"search\": [{\r\n          \"order\": \"id\",\r\n          \"items\": [{\r\n            \"np\": \"9\",\r\n            \"value\": \"47\"\r\n          }]\r\n        }],\r\n        \"sState\": [{\r\n          \"name\": \"id\",\r\n          \"visible\": true\r\n        }, {\r\n          \"name\": \"name\",\r\n          \"visible\": true\r\n        }],\r\n        \"visits\": 10\r\n      }\r\n    }]\r\n  }\r\n}\r\n```\r\n\r\n**Frisby.js TEST:**\r\n\r\n```js\r\nvar frisby = require('frisby');\r\nfrisby.create('Test Response')\r\n  .get('https://api.myjson.com/bins/rpay')\r\n  .addHeader('User-Agent', 'frisbyJS Test')\r\n  .expectJSONTypes({\r\n    'success': Boolean,\r\n    'data': Object\r\n  })\r\n  .expectJSONTypes('data.user.?', {\r\n    'id': Number,\r\n    'title': String,\r\n    'settings': {\r\n      'vOrder': Array,\r\n      'sState': Array,\r\n      'search': function (val) {\r\n        // Trying some function\r\n        expect(val).toBeType(Array);\r\n      },\r\n      'visits': Array\r\n    }\r\n  })\r\n  .toss();\r\n```\r\n\r\n"}}