samedi 9 novembre 2019

travese throuh json in laravel

In laravel blade traverse through json. Access score_set,scoring_criteria,fields and pivot fields.

{
"id":1, "created_at":"2019-09-29 11:53:46", "updated_at":"2019-09-29 11:53:46", "deleted_at":null, "score_set_id":1, "round_id":null, "roles_id":null, "group_id":null, "score_set":{
"id":1, "name":"test score", "judge_mode":"gallery", "order":2, "created_at":"2019-09-25 11:30:25", "updated_at":"2019-09-25 11:31:06", "deleted_at":null, "season_id":1, "role_id":null, "group_id":null, "reg_type":"entrant", "confidentiality_agreement_id":2, "lock_result":1, "calculation_type":"mean", "scoring_criteria":[
{
"id":3, "label":"ee", "score_title":"dsd", "shortcode":"sds", "hint_text_optional":"<p>&nbsp;</p>", "help_text_optional":"sds", "maximum_score":100, "minimum_score":0, "weight":"1", "control":"keyboard", "order":2, "extra_field_1":null, "increment":1, "score_empty":0, "created_at":"2019-09-27 13:54:50", "updated_at":"2019-09-27 13:54:50", "deleted_at":null, "score_set_id":1, "group_id":null, "field_id":null, "fields":[
        ]
     },
     {  
        "id":4,
        "label":"sds",
        "score_title":null,
        "shortcode":null,
        "hint_text_optional":"&lt;p&gt;&amp;nbsp;&lt;\/p&gt;",
        "help_text_optional":null,
        "maximum_score":100,
        "minimum_score":0,
        "weight":"1",
        "control":"keyboard",
        "order":3,
        "extra_field_1":null,
        "increment":1,
        "score_empty":1,
        "created_at":"2019-09-27 13:56:01",
        "updated_at":"2019-09-27 13:56:01",
        "deleted_at":null,
        "score_set_id":1,
        "group_id":null,
        "field_id":null,
        "fields":[  

        ]
     },
     {  
        "id":5,
        "label":"eeeee",
        "score_title":"234234",
        "shortcode":"234",
        "hint_text_optional":"&lt;p&gt;&amp;nbsp;&lt;\/p&gt;",
        "help_text_optional":null,
        "maximum_score":100,
        "minimum_score":0,
        "weight":"1",
        "control":"keyboard",
        "order":3,
        "extra_field_1":null,
        "increment":1,
        "score_empty":1,
        "created_at":"2019-09-28 11:14:20",
        "updated_at":"2019-09-28 11:14:20",
        "deleted_at":null,
        "score_set_id":1,
        "group_id":null,
        "field_id":null,
        "fields":[  

        ]
     },
     {  
        "id":6,
        "label":"ss",
        "score_title":"wewe",
        "shortcode":null,
        "hint_text_optional":"&lt;p&gt;&amp;nbsp;&lt;\/p&gt;",
        "help_text_optional":null,
        "maximum_score":100,
        "minimum_score":0,
        "weight":"1",
        "control":"keyboard",
        "order":3,
        "extra_field_1":null,
        "increment":1,
        "score_empty":1,
        "created_at":"2019-09-30 12:14:16",
        "updated_at":"2019-09-30 12:14:16",
        "deleted_at":null,
        "score_set_id":1,
        "group_id":null,
        "field_id":null,
        "fields":[  

        ]
     },
     {  
        "id":7,
        "label":"ss",
        "score_title":"wewe",
        "shortcode":null,
        "hint_text_optional":"&lt;p&gt;&amp;nbsp;&lt;\/p&gt;",
        "help_text_optional":null,
        "maximum_score":100,
        "minimum_score":0,
        "weight":"1",
        "control":"keyboard",
        "order":3,
        "extra_field_1":null,
        "increment":1,
        "score_empty":1,
        "created_at":"2019-09-30 12:15:19",
        "updated_at":"2019-09-30 12:15:19",
        "deleted_at":null,
        "score_set_id":1,
        "group_id":null,
        "field_id":null,
        "fields":[  

        ]
     },
     {  
        "id":8,
        "label":"text",
        "score_title":null,
        "shortcode":null,
        "hint_text_optional":"&lt;p&gt;&amp;nbsp;&lt;\/p&gt;",
        "help_text_optional":null,
        "maximum_score":100,
        "minimum_score":0,
        "weight":"1",
        "control":"keyboard",
        "order":2,
        "extra_field_1":null,
        "increment":1,
        "score_empty":1,
        "created_at":"2019-09-30 20:31:15",
        "updated_at":"2019-09-30 20:31:15",
        "deleted_at":null,
        "score_set_id":1,
        "group_id":null,
        "field_id":null,
        "fields":[  

        ]
     },
     {  
        "id":9,
        "label":"3434",
        "score_title":null,
        "shortcode":null,
        "hint_text_optional":"&lt;p&gt;&amp;nbsp;&lt;\/p&gt;",
        "help_text_optional":null,
        "maximum_score":100,
        "minimum_score":0,
        "weight":"3",
        "control":"keyboard",
        "order":3,
        "extra_field_1":null,
        "increment":null,
        "score_empty":1,
        "created_at":"2019-09-30 20:33:45",
        "updated_at":"2019-09-30 20:33:45",
        "deleted_at":null,
        "score_set_id":1,
        "group_id":null,
        "field_id":null,
        "fields":[  

        ]
     },
     {  
        "id":10,
        "label":"SDSD",
        "score_title":null,
        "shortcode":null,
        "hint_text_optional":"&lt;p&gt;&amp;nbsp;&lt;\/p&gt;",
        "help_text_optional":null,
        "maximum_score":100,
        "minimum_score":0,
        "weight":"3",
        "control":"keyboard",
        "order":3,
        "extra_field_1":null,
        "increment":null,
        "score_empty":1,
        "created_at":"2019-09-30 20:34:40",
        "updated_at":"2019-09-30 20:34:40",
        "deleted_at":null,
        "score_set_id":1,
        "group_id":null,
        "field_id":null,
        "fields":[  

        ]
     },
     {  
        "id":11,
        "label":"w",
        "score_title":"3",
        "shortcode":"3",
        "hint_text_optional":"&lt;p&gt;&amp;nbsp;&lt;\/p&gt;",
        "help_text_optional":null,
        "maximum_score":100,
        "minimum_score":0,
        "weight":"3",
        "control":"keyboard",
        "order":3,
        "extra_field_1":null,
        "increment":3,
        "score_empty":0,
        "created_at":"2019-09-30 20:35:23",
        "updated_at":"2019-10-01 22:56:40",
        "deleted_at":null,
        "score_set_id":1,
        "group_id":null,
        "field_id":null,
        "fields":[  

        ]
     },
     {  
        "id":12,
        "label":"score criteriass",
        "score_title":"score criteriass",
        "shortcode":null,
        "hint_text_optional":"&lt;p&gt;&amp;nbsp;&lt;\/p&gt;",
        "help_text_optional":"ss",
        "maximum_score":100,
        "minimum_score":0,
        "weight":"50",
        "control":"keyboard",
        "order":10,
        "extra_field_1":null,
        "increment":5,
        "score_empty":1,
        "created_at":"2019-10-05 02:42:55",
        "updated_at":"2019-10-17 15:49:31",
        "deleted_at":null,
        "score_set_id":1,
        "group_id":null,
        "field_id":null,
        "fields":[  
           {  
              "id":51,
              "label":"Enter A-B",
              "hint_text":null,
              "help_text":null,
              "field_order":5,
              "registion_type":"two",
              "field_type":"textbox-1",
              "field_access":null,
              "min_char":null,
              "max_char":null,
              "min_val":null,
              "max_val":null,
              "min_word":null,
              "max_word":null,
              "read_only":0,
              "html_json":null,
              "html_store_type":null,
              "field":"entry",
              "condition":0,
              "field_respone":null,
              "logic_condition":null,
              "input_value":null,
              "created_at":"2019-10-17 05:40:47",
              "updated_at":"2019-10-17 05:40:47",
              "deleted_at":null,
              "group_id":null,
              "season_id":1,
              "tab_id":5,
              "input_field_id":null,
              "pivot":{  
                 "scoring_criterion_id":12,
                 "entry_field_id":51
              }
           },
           {  
              "id":52,
              "label":"Enter Name A",
              "hint_text":null,
              "help_text":null,
              "field_order":6,
              "registion_type":"two",
              "field_type":"textbox-1",
              "field_access":null,
              "min_char":null,
              "max_char":null,
              "min_val":null,
              "max_val":null,
              "min_word":null,
              "max_word":null,
              "read_only":0,
              "html_json":null,
              "html_store_type":null,
              "field":"entry",
              "condition":0,
              "field_respone":null,
              "logic_condition":null,
              "input_value":null,
              "created_at":"2019-10-17 05:41:35",
              "updated_at":"2019-10-17 05:41:35",
              "deleted_at":null,
              "group_id":null,
              "season_id":1,
              "tab_id":5,
              "input_field_id":null,
              "pivot":{  
                 "scoring_criterion_id":12,
                 "entry_field_id":52
              }
           },
           {  
              "id":53,
              "label":"Enter Name B-A.A",
              "hint_text":null,
              "help_text":null,
              "field_order":1,
              "registion_type":"two",
              "field_type":"textbox-1",
              "field_access":null,
              "min_char":null,
              "max_char":null,
              "min_val":null,
              "max_val":null,
              "min_word":null,
              "max_word":null,
              "read_only":0,
              "html_json":null,
              "html_store_type":null,
              "field":"entry",
              "condition":0,
              "field_respone":null,
              "logic_condition":null,
              "input_value":null,
              "created_at":"2019-10-17 05:42:16",
              "updated_at":"2019-10-17 05:42:16",
              "deleted_at":null,
              "group_id":null,
              "season_id":1,
              "tab_id":6,
              "input_field_id":null,
              "pivot":{  
                 "scoring_criterion_id":12,
                 "entry_field_id":53
              }
           },
           {  
              "id":54,
              "label":"Enter File CAtB",
              "hint_text":null,
              "help_text":null,
              "field_order":2,
              "registion_type":"two",
              "field_type":"file-1",
              "field_access":null,
              "min_char":null,
              "max_char":null,
              "min_val":null,
              "max_val":null,
              "min_word":null,
              "max_word":null,
              "read_only":0,
              "html_json":null,
              "html_store_type":null,
              "field":"entry",
              "condition":0,
              "field_respone":null,
              "logic_condition":null,
              "input_value":null,
              "created_at":"2019-10-17 05:46:53",
              "updated_at":"2019-10-17 05:46:53",
              "deleted_at":null,
              "group_id":null,
              "season_id":1,
              "tab_id":5,
              "input_field_id":null,
              "pivot":{  
                 "scoring_criterion_id":12,
                 "entry_field_id":54
              }
           }
        ]
     }
  ]


} } Please find me solution.


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire