GithubHelp home page GithubHelp logo

paulomcnally / galadriel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from moi-solutions/galadriel

0.0 2.0 0.0 5 KB

Gem for handling parameter arrays.

Home Page: https://rubygems.org/gems/galadriel

License: MIT License

Ruby 100.00%

galadriel's Introduction

galadriel

Gem for handling parameter arrays.

hash_array = Galadriel.parse(params[:my_params])

From

{
  "id": [
    "231",
    "609"
  ],
  "item_short_name": [
    "Glifosato",
    "Diesel"
  ],
  "profit_center_code": [
    "",
    ""
  ],
  "name": [
    "Glifosan 10L",
    "Disel 1L"
  ],
  "container": [
    "10.0 L",
    "1.0 L"
  ],
  "onhand_quantity": [
    "124.1000 und",
    "489.5000 und"
  ],
  "reserved_quantity": [
    "0.0000 und",
    "0.0000 und"
  ],
  "diff_quantity": [
    "114.1000  und",
    "479.5000  und"
  ],
  "new_quantity": [
    "10.0000  und",
    "10.0000  und"
  ],
  "new_unit_cost": [
    "350.0000",
    "23.0000"
  ],
  "reason": [
    "4",
    "2"
  ],
  "reason_type": [
    "Reducción",
    "Reducción"
  ]
}

To

[
  {
    "id": "231",
    "item_short_name": "Glifosato",
    "profit_center_code": "",
    "name": "Glifosan 10L",
    "container": "10.0 L",
    "onhand_quantity": "124.1000 und",
    "reserved_quantity": "0.0000 und",
    "diff_quantity": "114.1000  und",
    "new_quantity": "10.0000  und",
    "new_unit_cost": "350.0000",
    "reason": "4",
    "reason_type": "Reducción"
  },
  {
    "id": "609",
    "item_short_name": "Diesel",
    "profit_center_code": "",
    "name": "Disel 1L",
    "container": "1.0 L",
    "onhand_quantity": "489.5000 und",
    "reserved_quantity": "0.0000 und",
    "diff_quantity": "479.5000  und",
    "new_quantity": "10.0000  und",
    "new_unit_cost": "23.0000",
    "reason": "2",
    "reason_type": "Reducción"
  }
]

galadriel's People

Contributors

paulomcnally avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.