IPWorks IoT 2020 JavaScript Edition

Questions / Feedback?

SetValue Method

Sets a new value for the element specified by XPath.

Syntax

async json.setValue(value : string, valueType : number): Promise<void>

Remarks

This method sets a new value for the element specified in XPath. This is used to modify an existing JSON document.

Value specifies the new value.

ValueType specifies the type of the value. Possible values are:

  • 0 (Object)
  • 1 (Array)
  • 2 (String)
  • 3 (Number)
  • 4 (Bool)
  • 5 (Null)
  • 6 (Raw)

See Save for details.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 JavaScript Edition - Version 20.0 [Build 8265]