src/Slack/Attachment/BasicInfoAttachment.php
private function addRecordDataAsJsonEncodedField($key, $label)
    {
        if (!empty($this->record[$key])) {
            $this->addField(new Field($label, json_encode($this->record[$key])));
        }
    }
private function addRecordDataAsJsonEncodedField($key, $label)
    {
        if (!empty($this->record[$key])) {
            $this->addField(new Field($label, json_encode($this->record[$key])));
        }
    }
private function addRecordDataAsJsonEncodedField ( $ key , $ label ) { if ( ! empty ( $ this -> record [ $ key ] ) ) { $ this -> addField ( new Field ( $ label , json_encode ( $ this -> record [ $ key ] ) ) ) ; } }
Check if a key is available in the record. If so, add it as a field.

@param string $key
@param string $label
Check if a key is available in the record . If so add it as a field .