All Projects → rapidwebltd → array_undot

rapidwebltd / array_undot

Licence: LGPL-3.0 license
array_undot (the opposite of the array_dot helper function) expands a dot notation array into a full multi-dimensional array.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to array undot

array-keyed-map
JS datastructure, like Map, but the keys are arrays
Stars: ✭ 29 (+93.33%)
Mutual labels:  array
CuVec
Unifying Python/C++/CUDA memory: Python buffered array ↔️ `std::vector` ↔️ CUDA managed memory
Stars: ✭ 73 (+386.67%)
Mutual labels:  array
HashMapC
A tiny library for using easily HashMap, arraylist in the C.
Stars: ✭ 21 (+40%)
Mutual labels:  array
FUPRAL
Fortran OO implementation of a generic container using an unlimited polymorphic class. Implementation of a resizable container array and a double linked list.
Stars: ✭ 18 (+20%)
Mutual labels:  array
pasvl
Array Validator (regular expressions for arrays, sort of)
Stars: ✭ 40 (+166.67%)
Mutual labels:  array
Data-Structures-Algorithms-Handbook
A series of important questions with solutions to crack the coding interview and ace it!
Stars: ✭ 30 (+100%)
Mutual labels:  array
php-collections
A collection library for php
Stars: ✭ 34 (+126.67%)
Mutual labels:  array
react-smart-key
Pass anything as key without re-renders
Stars: ✭ 17 (+13.33%)
Mutual labels:  array
sharyn
🌹 Sharyn – A collection of JavaScript / TypeScript packages that make your life easier and reduce your boilerplate code
Stars: ✭ 30 (+100%)
Mutual labels:  helper-functions
expand-hash
Recursively expands property keys with dot-notation into objects.
Stars: ✭ 25 (+66.67%)
Mutual labels:  dot-notation
arrayer
Array manipulation. Get, set & delete keys with dot notation, also prepares an array to be put in a file (php array or json).
Stars: ✭ 14 (-6.67%)
Mutual labels:  dot-notation
linqjs
Perform queries on collections in the manner of C#s System.Linq in JavaScript
Stars: ✭ 14 (-6.67%)
Mutual labels:  array
math eval
✖️➕➖➗ `math_eval` safely evaluates mathematical expressions
Stars: ✭ 33 (+120%)
Mutual labels:  helper-functions
Public-Method-CardGame-NiuNiu
纸牌游戏牛牛的最优算法及Method
Stars: ✭ 21 (+40%)
Mutual labels:  array
arrayfire-haskell
Haskell bindings to ArrayFire
Stars: ✭ 52 (+246.67%)
Mutual labels:  array
an-array-of-spanish-words
List of ~636,000 Spanish words
Stars: ✭ 31 (+106.67%)
Mutual labels:  array
BitLens
🔎 Have your bits and eat them too! A C++17 bit lens container for vector types.
Stars: ✭ 20 (+33.33%)
Mutual labels:  array
repeat-element
Create an array by repeating the given string n times.
Stars: ✭ 19 (+26.67%)
Mutual labels:  array
arr
数组增强组件主要是对数组等数据进行处理,如无限级分类操作、商品规格的迪卡尔乘积运算等。
Stars: ✭ 62 (+313.33%)
Mutual labels:  array
longest
Get the length of the longest item in an array.
Stars: ✭ 31 (+106.67%)
Mutual labels:  array

array_undot

Build Status Coverage Status StyleCI Packagist

This package provides a helper function called array_undot, which expands a dot notation array into a full multi-dimensional array. It is, therefore, the opposite of the array_dot helper function provided by Laravel.

Installation

To install, just run the following composer command.

composer require rapidwebltd/array_undot

The array_undot helper function will then be available globally in your project.

Usage

The following basic examples show how to use the array_undot helper function.

$dotNotationArray = ['products.desk.price' => 100];

$expanded = array_undot($dotNotationArray)

// ['products' => ['desk' => ['price' => 100]]];
$dotNotationArray = ['products.desk.price' => 100, 
                     'products.desk.name' => 'Oak Desk',
                     'products.lamp.price' => 15,
                     'products.lamp.name' => 'Red Lamp'];

$expanded = array_undot($dotNotationArray)

/*
[
    'products' => [
        'desk' => [
            'price' => 100,
            'name' => 'Oak Desk'
        ],
        'lamp' => [
            'price' => 15,
            'name' => 'Red Lamp'
        ]
    ]
]
*/
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].