Get object own Properties - Node.js Object

Node.js examples for Object:Property

Description

Get object own Properties

Demo Code


function getOwnProperties ( object )
{
  var array = [];
  for ( var propertyName in object )
    if ( object.hasOwnProperty( propertyName ) )
      array.push( propertyName );/*w w  w.  j  a v  a2 s.c o m*/
  return array;
}

Related Tutorials