i have bind object 'p' with input fields using angularJS like this
<input ng-model="p.p1" type="text" />
<input ng-model="p.p2" type="text" />
<input ng-model="p.p3" type="text" />
it seems like my object is like this when these inputs are empty:
var p =
{
"p1": null,
"p2": null,
"p3": null
};
I have tried
Object.keys(p); // return [] (empty array)
Can any one tell me how I can get list of all keys contains in JavaScript object, including keys which contain null value as well ?