If you specify an ORDER to the JSON output, Clay doesn't respect the order. Here is what was in my prompt, and notice how it's sorted in a different order than the JSON outputs. Address Standardization System with Ordered Output IMPORTANT: The JSON output MUST maintain this exact field order: address_number address_street address_unit address_city address_state address_country address_original
π€ You've caught us outside of our support hours (9am-9pm EST), but don't worry - we'll be back in touch within 24 hours (often sooner!). If you haven't already, please include the URL of your table in the thread below so that we can help you as quickly as possible!
Hey Jordan, Thanks for reaching out! The team is actively working on improvements for JSON output ordering and plans to address this issue soon. In the meantime, a helpful workaround is to manually re-order the columns as needed. Iβve also passed your feedback to the team to keep them informed. Let us know if thereβs anything else we can help with! π
Hey Jordan C.! curious whats your use case here? unfortunately the nature of JSON is unordered:
An object is an unordered set of name/value pairs. An object begins with {left brace and ends with }right brace. Each name is followed by :colon and the name/value pairs are separated by ,comma.
but if i understand your use case there could be a work around
we may be able to preserve the ordering with some techniques, but first want to understand the need!
Oh well it's just weird to tell Claude to output it in a human order (1, 2, 3, 4) and then have it returned in an engineering order (e.g. JSON has no natural order--CHAOS!) So it's just nice if I have a huge array that has a natural order (like, addresses) to have it ordered in the exact way Claude outputs it... right now Clay basically changes the order that the model outputs the JSON. And the models are pretty consistent.
Got it Jordan, thanks for clarifying. Adam has context on this now so he can better evaluate things and see if/where this might fit into the roadmap as a future improvement. Let us know if we can help you with any formula columns/formatting for this in the meantime!