Trimmed keys and values of array