Code Monkey home page Code Monkey logo

Comments (5)

xavdid avatar xavdid commented on June 12, 2024

Yep! All keys need to be unique. So instead of 2 name fields, try shipping_name and billing_name.

from zapier-platform-cli.

codetycon avatar codetycon commented on June 12, 2024

Yep! All keys need to be unique. So instead of 2 name fields, try shipping_name and billing_name.

So if I use keys like shipping_name, billing_name then does it will auto break to object like
shipping :{ name:"myname"}, billing:{"name":"bname"} ?

from zapier-platform-cli.

xavdid avatar xavdid commented on June 12, 2024

Nope. Regardless of how you set up input fields, the result will be a flat object: {shipping_name: 'a', billing_name: 'b'}

from zapier-platform-cli.

codetycon avatar codetycon commented on June 12, 2024

object

Thanks for the reply, I read somewhere in the article If we create fields like this
{ key: 'billingAddress__name', label: 'Billing Address Name', /*other properties*/ }, { key: 'billingAddress__line1', label: 'Billing Address Line 1', /*other properties*/ },

Then Zapier will break them as below before sending to api
{ "billingAddress" : { "name": "whatever value" } }

Is this correct?

I tried this but not working same, it sending a flat object instead of inherit object

from zapier-platform-cli.

xavdid avatar xavdid commented on June 12, 2024

I believe those are old docs (which we are aware of, but haven't been able to clear yet) and aren't relevant here. CLI always gets a flat object. You could filter your object for keys starting with billing and grab that subset of properties that way.

from zapier-platform-cli.

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.