ObjectUtils

ObjectUtils.isArray(obj)
Arguments
  • obj (variant()) – an object

Returns

whether the passed object is an Array.

ObjectUtils.camel(str)
Arguments
  • str (string()) – A string

Returns

the same string, converted from lower_casing_with_underscores to camelCase.

ObjectUtils.flatten(obj)
Arguments
  • obj (variant()) – an object

Returns

object with all keys converted to camelCase, and nested objects merged at root with path prefix

.import fbx.data 1.0 as Fbx

var x = {
    some_key: 1,
    some_object: {
        test: "a",
        other: {
            sub_key: "b"
        }
    }
};

var y = Fbx.ObjectUtils.flatten(x);

/* y = {
     someKey: 1,
     someObjectTest: "a",
     someObjectOtherSubKey: "b"
  }
  */