I need to transform this json (not all fields_atributes fields) into an array in php so I can change the data easily
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 how to do it when it is 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 someone has doubts about JSON, it comes from the following API: pipefy