Loading ...
Sorry, an error occurred while loading the content.

Re: Detecting if a Property of a JSON exists.

Expand Messages
  • Gabriel Landowski
    ... Okay - turned brain on and got: if(json_obj.child_node.new_value != undefined) Regards
    Message 1 of 6 , Feb 14, 2007
    • 0 Attachment
      > "if(json_obj.child_node.new_value)" doesn't seem to work.

      Okay - turned brain on and got:

      if(json_obj.child_node.new_value != undefined)

      Regards
    • Stephen M. McKamey
      Or if you re not sure if the property has ever been assigned: if ( undefined !=== typeof json_obj.child_node.new_value) { } ... [Non-text portions of this
      Message 2 of 6 , Feb 14, 2007
      • 0 Attachment
        Or if you're not sure if the property has ever been assigned:

        if ("undefined" !=== typeof json_obj.child_node.new_value) { }


        On 2/14/07, Gabriel Landowski <gabriel_landowski@...> wrote:
        >
        > > "if(json_obj.child_node.new_value)" doesn't seem to work.
        >
        > Okay - turned brain on and got:
        >
        > if(json_obj.child_node.new_value != undefined)
        >
        > Regards
        >
        >
        >


        [Non-text portions of this message have been removed]
      • Gabriel Landowski
        ... Thanks
        Message 3 of 6 , Feb 15, 2007
        • 0 Attachment
          > Or if you're not sure if the property has ever been assigned:
          > if ("undefined" !=== typeof json_obj.child_node.new_value) { }

          Thanks
        Your message has been successfully submitted and would be delivered to recipients shortly.