diff --git src/wp-includes/rest-api.php src/wp-includes/rest-api.php
index d3bb80a3d6..4d9708e82a 100644
--- src/wp-includes/rest-api.php
+++ src/wp-includes/rest-api.php
@@ -2038,15 +2038,28 @@ function rest_filter_response_by_context( $data, $schema, $context ) {
 		return $data;
 	}
 
+	$is_array_type  = 'array' === $type || ( is_array( $type ) && in_array( 'array', $type, true ) );
+	$is_object_type = 'object' === $type || ( is_array( $type ) && in_array( 'object', $type, true ) );
+
+	if ( $is_array_type && $is_object_type ) {
+		if ( rest_is_array( $data ) ) {
+			$is_object_type = false;
+		} else {
+			$is_array_type = false;
+		}
+	}
+
+	$has_additional_properties = $is_object_type && isset( $schema['additionalProperties'] ) && is_array( $schema['additionalProperties'] );
+
 	foreach ( $data as $key => $value ) {
 		$check = array();
 
-		if ( 'array' === $type || ( is_array( $type ) && in_array( 'array', $type, true ) ) ) {
+		if ( $is_array_type ) {
 			$check = isset( $schema['items'] ) ? $schema['items'] : array();
-		} elseif ( 'object' === $type || ( is_array( $type ) && in_array( 'object', $type, true ) ) ) {
+		} elseif ( $is_object_type ) {
 			if ( isset( $schema['properties'][ $key ] ) ) {
 				$check = $schema['properties'][ $key ];
-			} elseif ( isset( $schema['additionalProperties'] ) && is_array( $schema['additionalProperties'] ) ) {
+			} elseif ( $has_additional_properties ) {
 				$check = $schema['additionalProperties'];
 			}
 		}
@@ -2058,8 +2071,12 @@ function rest_filter_response_by_context( $data, $schema, $context ) {
 		if ( ! in_array( $context, $check['context'], true ) ) {
 			if ( is_object( $data ) ) {
 				unset( $data->$key );
-			} else {
+			} elseif ( $is_object_type ) {
 				unset( $data[ $key ] );
+			} else {
+				// All array items share schema, so there's no need to check each one.
+				$data = array();
+				break;
 			}
 		} elseif ( is_array( $value ) || is_object( $value ) ) {
 			$new_value = rest_filter_response_by_context( $value, $check, $context );
diff --git tests/phpunit/tests/rest-api.php tests/phpunit/tests/rest-api.php
index 789c4e19b3..7497d13017 100644
--- tests/phpunit/tests/rest-api.php
+++ tests/phpunit/tests/rest-api.php
@@ -1314,6 +1314,126 @@ class Tests_REST_API extends WP_UnitTestCase {
 					),
 				),
 			),
+			'object with no matching properties' => array(
+				array(
+					'$schema'    => 'http://json-schema.org/draft-04/schema#',
+					'type'       => 'object',
+					'properties' => array(
+						'a' => array(
+							'type'    => 'string',
+							'context' => array( 'edit' ),
+						),
+						'b' => array(
+							'type'    => 'string',
+							'context' => array( 'edit' ),
+						),
+					),
+				),
+				array(
+					'a' => 'hi',
+					'b' => 'hello',
+				),
+				array(),
+			),
+			'array whose type does not match' => array(
+				array(
+					'$schema'    => 'http://json-schema.org/draft-04/schema#',
+					'type'       => 'object',
+					'properties' => array(
+						'arr' => array(
+							'type'  => 'array',
+							'context' => array( 'view' ),
+							'items' => array(
+								'type'    => 'string',
+								'context' => array( 'edit' ),
+							),
+						),
+					),
+				),
+				array(
+					'arr' => array( 'foo', 'bar', 'baz' ),
+				),
+				array( 'arr' => array() ),
+			),
+			'array and object type passed object' => array(
+				array(
+					'$schema'    => 'http://json-schema.org/draft-04/schema#',
+					'type'       => array( 'array', 'object' ),
+					'properties' => array(
+						'a' => array(
+							'type'    => 'string',
+							'context' => array( 'view' ),
+						),
+						'b' => array(
+							'type'    => 'string',
+							'context' => array( 'view' ),
+						),
+					),
+					'items'      => array(
+						'type'       => 'object',
+						'context'    => array( 'edit' ),
+						'properties' => array(
+							'a' => array(
+								'type'    => 'string',
+								'context' => array( 'view' ),
+							),
+							'b' => array(
+								'type'    => 'string',
+								'context' => array( 'view' ),
+							),
+						),
+					),
+				),
+				array(
+					'a' => 'foo',
+					'b' => 'bar',
+				),
+				array(
+					'a' => 'foo',
+					'b' => 'bar',
+				),
+			),
+			'array and object type passed array' => array(
+				array(
+					'$schema'    => 'http://json-schema.org/draft-04/schema#',
+					'type'       => array( 'array', 'object' ),
+					'properties' => array(
+						'a' => array(
+							'type'    => 'string',
+							'context' => array( 'view' ),
+						),
+						'b' => array(
+							'type'    => 'string',
+							'context' => array( 'view' ),
+						),
+					),
+					'items'      => array(
+						'type'       => 'object',
+						'context'    => array( 'edit' ),
+						'properties' => array(
+							'a' => array(
+								'type'    => 'string',
+								'context' => array( 'view' ),
+							),
+							'b' => array(
+								'type'    => 'string',
+								'context' => array( 'view' ),
+							),
+						),
+					),
+				),
+				array(
+					array(
+						'a' => 'foo',
+						'b' => 'bar',
+					),
+					array(
+						'a' => 'foo',
+						'b' => 'bar',
+					),
+				),
+				array(),
+			),
 		);
 	}
 
