08-06-2024 07:53 AM - edited 08-06-2024 07:55 AM
There are two special operators related to data types in SnapLogic. These operators are typeof and instanceof. The names look like the operators in JavaScript but they don't work like in Javascript.
const a = new String("Hello world");
const b = String("Hello world");
const c = "Hello world";
console.log(a instanceof String); // true
console.log(b instanceof String); // false
console.log(c instanceof String); // false
console.log(typeof a); // object
console.log(typeof b); // string
console.log(typeof c); // string
in SnapLogic:
"Hello world" instanceof String /* true */
typeof "Hello world" /* string */
SnapLogic expression language doesn't support classes then what are the instances mentioned in the SnapLogic documentation for the special operator instanceof?
As I know SnapLogic was implemented with Java. Using the Type Inspector I found the following data types:
Maybe instanceof derives the names from the Java data types?
I also noticed another data types in the snap Mapper for schema. What the difference between the data types for typeof and Mapper?
All the things confuse me.