{"action":"opened","issue":{"url":"https://api.github.com/repos/fac-13/stackMatch/issues/87","repository_url":"https://api.github.com/repos/fac-13/stackMatch","labels_url":"https://api.github.com/repos/fac-13/stackMatch/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/fac-13/stackMatch/issues/87/comments","events_url":"https://api.github.com/repos/fac-13/stackMatch/issues/87/events","html_url":"https://github.com/fac-13/stackMatch/issues/87","id":322510877,"number":87,"title":"Object values in postMemberInfo","user":{"login":"eliascodes","id":12719553,"avatar_url":"https://avatars3.githubusercontent.com/u/12719553?v=4","gravatar_id":"","url":"https://api.github.com/users/eliascodes","html_url":"https://github.com/eliascodes","followers_url":"https://api.github.com/users/eliascodes/followers","following_url":"https://api.github.com/users/eliascodes/following{/other_user}","gists_url":"https://api.github.com/users/eliascodes/gists{/gist_id}","starred_url":"https://api.github.com/users/eliascodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliascodes/subscriptions","organizations_url":"https://api.github.com/users/eliascodes/orgs","repos_url":"https://api.github.com/users/eliascodes/repos","events_url":"https://api.github.com/users/eliascodes/events{/privacy}","received_events_url":"https://api.github.com/users/eliascodes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-12T13:17:58Z","updated_at":"2018-05-12T13:17:58Z","closed_at":null,"author_association":"NONE","body":"https://github.com/fac-13/stackMatch/blob/a84d27cc4b9bf511095f1238d74322f4c2be17a3/src/model/queries/postMemberInfo.js#L4\r\n\r\nBe aware that `Object.keys` and `Object.values` return keys and values, respectively, in [an arbitrary order](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values). [V8 (and therefore Node) return them in insertion order](https://stackoverflow.com/questions/30927089/nodejs-order-of-properties-guarantee?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa), so you should be fine as long as your input object is constructed with the keys in the order that they're specified in the query, though frankly, this introduces an unnecessary coupling between the function and it's calling code.\r\n\r\nYou can fix this in three ways: either have positional arguments in the postMemberInfo function, or deconstruct the input object, or construct the SQL query string dynamically from the input object. The second option is probably simplest.\r\n"}}
{"actor":{"display_login":"eliascodes"}}