How to get Gravity forms entry value by label?

function harsh_get_value_by_label( $form, $entry, $label ) {
	foreach ( $form['fields'] as $field ) {
		$lead_key = $field->label;
		
		if ( strtolower( $lead_key ) == strtolower( $label ) ) {
			return $entry[ $field->id ];
		}
		if($field->inputs != null and count($field->inputs))
		{
			foreach($field->inputs as $children)
			{
				$subLeadKey = $children["label"];
				if ( strtolower( $subLeadKey ) == strtolower( $label ) ) 
				{
					return $entry[ $children["id"] ];
				}
			}
		}
	}
	return false;
}