Giter Club home page Giter Club logo

Comments (3)

brainfoolong avatar brainfoolong commented on June 14, 2024

Hi, thanks for reaching out.

Unfortunately, this library is not designed to fix wrong form names. When form names are not named properly in ascending numeric order, they will not become an array.

The library cannot and will never know if this should be an array. Numbers 3,2,11 can even be an ID from your DB for example. In this case you absolutely not want the library to change this in the output.

So, this is absolutely not a bug of this library. This must be fixed in the form names itself.
This library will make an array, if you name it in ascending numeric order, starting from 0. Example: 0,1,2

from form-data-json.

basileroutier avatar basileroutier commented on June 14, 2024

Oh okay, it would be (I think), a good idea to add in the configuration a line allowing people (as in my case) to do this without having a name in our database with numbers and to put it in Array format.
I would understand if it's hard to do (it's just a feature that would be really nice =D ).

from form-data-json.

brainfoolong avatar brainfoolong commented on June 14, 2024

I understand your case, but this library is not intended to be used like that. Everything can be done with code, but this is not the right place for this piece of problem.

I suggest you, when you cannot change your input names, you manipulate the data, that comes out of toJson, afterwards yourself.

Have a nice day.

from form-data-json.

Related Issues (20)

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.