Answers for "convert all properties, object, array to camal case in angular js"

0

convert all properties, object, array to camal case in angular js

const keysToCamel = function (o) {
  if (isObject(o)) {
    const n = {};

    Object.keys(o)
      .forEach((k) => {
        n[toCamel(k)] = keysToCamel(o[k]);
      });

    return n;
  } else if (isArray(o)) {
    return o.map((i) => {
      return keysToCamel(i);
    });
  }

  return o;
};
Posted by: Guest on December-21-2020

Code answers related to "convert all properties, object, array to camal case in angular js"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language