1
I need to turn this json ( not with all fields_attribute fields) into an array in php to easily change the data
mutation{
createCard(
input: {
pipe_id: 219739
fields_attributes: [
{field_id: "assignee", field_value:[00000, 00001]}
{field_id: "checklist_vertical", field_value: ["a", "b"]}
{field_id: "checklist_horizontal", field_value: ["b"]}
{field_id: "cpf", field_value: "123.456.789-00"}
{field_id: "cnpj", field_value: "12.345.678/1234-00"}
{field_id: "date", field_value: "1977-01-20"}
{field_id: "date_time", field_value: "2017-07-20T21:00:00+00:00"}
{field_id: "due_date", field_value: "2017-07-20T21:00:00+00:00"}
{field_id: "currency", field_value: "9500.50"}
{field_id: "label_select", field_value: [890073, 908006]}
{field_id: "email", field_value: "[email protected]"}
{field_id: "number", field_value: 9000}
{field_id: "short_text", field_value: "Rocky Balboa"}
{field_id: "long_text", field_value: "It ain’t about how hard you hit. It’s about how hard you can get hit and keep moving forward. It’s how much you can take, and keep moving forward. That’s how winning is done."}
{field_id: "radio_vertical", field_value: "yes"}
{field_id: "radio_horizontal", field_value: "no"}
{field_id: "phone", field_value: "+55 11 1234-5678"}
{field_id: "select", field_value: "B. Rocky Balboa II"}
{field_id: "time", field_value: "17:25"}
]
parent_ids: ["2750027"]
}
) {
card {
id
title
}
}
}
But you can’t do it when you’re like this:
{field_id: "cpf", field_value: "123.456.789-00"}
What I’ve done so far is this:
$arr = array(
"mutation" => array(
"createCard" => array(
"input" => array(
"pipe_id" => "219739",
"fields_attributes" => array(
"field_id" => "valore",
),
),
),
),
);
If anyone has any doubts about JSON, it comes from the following API: pipefy
I noticed it after I posted it
– Igor Oliveira
No problem, the important thing is that it was solved ! :]
– rbz