Run one of the following command inside your project directory to install the package:
$ npm i transform-obj
or
$ yarn add transform-obj
Input | Output |
import { transformToCamelCase } from "transform-obj";
const someData = [
{
id: 1,
status_avaliable_online: true,
},
];
const transform = transformToCamelCase(someData); |
const someData = [
{
id: 1,
statusAvaliableOnline: true,
},
]; |
and support for nested objects or nested arrays.