Skip to content

Instantly share code, notes, and snippets.

View azimidev's full-sized avatar
:octocat:
Pro

Eric Azimi azimidev

:octocat:
Pro
View GitHub Profile
@azimidev
azimidev / CleanObject.js
Created October 15, 2021 12:41
CleanObject
/**
* Goes deep recursive through JSON object,
* if the children is only object and has less than 50 children {node},
* adds it to the new result otherwise return the child.
*
* @param obj
* @param node 50
* @returns {{}|*}
*/
function cleanObject(obj, node = 50) {
$response = Http::attach(
'image',
$imageFileContents,
'photo.jpg'
)->post('http://192.168.0.203:80/v1/vision/detection');
<?php
declare(strict_types=1);
return [
'us-east-1' => [
'mediaconvert' => [],
'rekognition' => [
'image' => [
'group1' => [