![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/dceprojects.corals.io/node_modules/collect.js/docs/api/ |
# `undot()` The `undot` method expands a single-dimensional collection that uses "dot" notation into a multi-dimensional collection: ```js const person = collect({ 'name.first_name': 'Marie', 'name.last_name': 'Valentine', 'address.line_1': '2992 Eagle Drive', 'address.line_2': '', 'address.suburb': 'Detroit', 'address.state': 'MI', 'address.postcode': '48219', }); const undotted = person.undot(); const all = undotted.all(); // { // name: { // first_name: 'Marie', // last_name: 'Valentine', // }, // address: { // line_1: '2992 Eagle Drive', // line_2: '', // suburb: 'Detroit', // state: 'MI', // postcode: '48219', // }, // } ``` [View source on GitHub](https://github.com/ecrmnn/collect.js/blob/master/src/methods/undot.js)